<template>
    <div class="PersonResume">
        <!-- 头部 -->
        <Header :navActive="-1" ref="Header" :random='random'/>
        <!-- 内容区域 -->
        <div class="main cl">
            <!-- banner -->
            <div class="banner"></div>
            <!-- block -->
            <div class="block w1200">
                <!--                <el-switch-->
                <!--                    @change="switchChange"-->
                <!--                    v-model="resumeType"-->
                <!--                    style="display: block"-->
                <!--                    active-color="#13ce66"-->
                <!--                    inactive-color="#ff4949"-->
                <!--                    :active-value="2"-->
                <!--                    :inactive-value="1"-->
                <!--                    active-text="校招简历"-->
                <!--                    inactive-text="社招简历">-->
                <!--                </el-switch>-->
                <div class="left fl">
                    <el-alert v-if="checkResult&&'成功'!=checkResult"
                              :title="checkResult"
                              type="error">
                    </el-alert>
                    <div class="top">
                        <label>请选择简历类型：</label>
                        <el-select v-model="resumeType" placeholder="请选择" @change="switchChange">
                            <el-option label="社招简历" :value="1">社招简历</el-option>
                            <el-option label="校招简历" :value="2">校招简历</el-option>
                        </el-select>

                        <!--                        <div class="checkResult"  >-->

                        <!--                            {{checkResult}}-->
                        <!--                        </div>-->
                    </div>
                    <div class="resume">
                        <!-- 个人信息 -->
                        <div class="section userinfo">
                            <div class="title">基本信息<span class="bt">必填，否则不允许投递简历</span>
                                <router-link class="look" style="z-index: 1000" target="_blank"
                                             :to="{name:'PersonResumeLook',query:{id: this.resumeId}}"><i
                                    class="el-icon-view"></i>预览
                                </router-link>

                                <div class="btnEdit" style="top: 10px;" @click="edit('formUserInfo','edit','')"><i
                                    class="el-icon-edit-outline"></i>编辑
                                </div>

                            </div>
                            <div class="primary">

                                <div class="photo">
                                    <el-avatar :size="80" :src="photo"></el-avatar>
                                    <el-upload ref="upload" class="avatar-uploader" action="#" :show-file-list="false"
                                               :on-change="handleAvatar" :auto-upload="false" accept="image/*">
                                        <i class="el-icon-camera"></i>
                                        <p>上传一寸照片</p>
                                    </el-upload>
                                </div>
                                <div class="text">
                                    <!--                                    <router-link class="look" target="_blank" :to="{name:'PersonResumeLook',query:{id: this.resumeId}}"><i-->
                                    <!--                                            class="el-icon-view"></i>预览-->
                                    <!--                                    </router-link>-->
                                    <!--                                    <div class="btnEdit" style="top: 10px;" @click="edit('formUserInfo','edit','')"><i-->
                                    <!--                                            class="el-icon-edit-outline"></i>编辑-->
                                    <!--                                    </div>-->
                                    <div class="name">{{ this.formUserInfo.name }}
                                        <span>更新时间：{{ this.formUserInfo.updateTime }}</span>
                                    </div>
                                    <div class="other">
                                        <span v-if="this.formUserInfo.sex==1">男</span>
                                        <span v-else>女</span>
                                        <span>{{ this.formUserInfo.age }}岁</span>
                                        <span>{{ this.formUserInfo.liveCity_dictText }}</span>
                                        <span
                                            v-if="!this.formUserInfo.jobTimeFlag">{{
                                                this.formUserInfo.workYear
                                            }}年工作经验</span>
                                        <span v-else>0年工作经验</span>
                                    </div>
                                    <div class="contact">
                                        <span><i class="iconfont icon-phone"></i>{{ this.formUserInfo.phone }}</span>
                                        <span><i class="iconfont icon-email"></i>{{ this.formUserInfo.email }}</span>
                                    </div>
                                </div>
                            </div>
                            <div class="edit" v-show="formUserInfoShow">
                                <el-form class="form cl" label-width="110px" label-position="top"
                                         :model="formUserInfo"
                                         :rules="userinfoRules" ref="formUserInfo">
                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="姓名" prop="name">
                                                <el-input v-model.trim="formUserInfo.name"
                                                          placeholder="请填写真实姓名"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="性别" prop="sex">
                                                <el-col>
                                                    <el-radio v-model="formUserInfo.sex" label="1" border>男</el-radio>
                                                    <el-radio v-model="formUserInfo.sex" label="2" border>女</el-radio>
                                                </el-col>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>

                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="出生年月" prop="birthday">
                                                <el-date-picker type="date" value-format="timestamp"
                                                                :picker-options="pickerOptionsDisabledAfterNow"
                                                                placeholder="请选择出生年月"
                                                                v-model="formUserInfo.birthday"></el-date-picker>
                                            </el-form-item>

                                        </el-col>
                                        <el-col :span="12">

                                            <el-form-item label="求职身份" prop="identity">
                                                <el-col>

                                                    <el-radio-group v-model="formUserInfo.identity"
                                                                    @change="restWorkStateAndIdentity(formUserInfo.identity)">
                                                        <el-radio v-model="formUserInfo.identity" v-if="resumeType == 1"
                                                                  label="1" border>职场人
                                                        </el-radio>
                                                        <el-radio v-model="formUserInfo.identity" label="2" border>应届生
                                                        </el-radio>

                                                    </el-radio-group>
                                                    <!--                                        2022年3月11日14:47:03 可以要求去掉            <el-radio v-model="formUserInfo.identity" label="3" border>在校生</el-radio>-->
                                                </el-col>
                                            </el-form-item>

                                        </el-col>
                                    </el-row>


                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="求职状态" prop="workState">
                                                <el-select v-if="formUserInfo.identity != '2'"
                                                           v-model="formUserInfo.workState" placeholder="请选择求职状态">
                                                    <el-option label="请选择" value=""></el-option>
                                                    <el-option label="离职-随时到岗" value="0"></el-option>
                                                    <el-option label="在职-月内到岗" value="1"></el-option>
                                                    <el-option label="在职-考虑机会" value="2"></el-option>
                                                    <el-option label="在职-暂不考虑" value="3"></el-option>
                                                </el-select>
                                                <!--                                               求职身份 为应届生时-->

                                                <el-select v-if="formUserInfo.identity =='2'"
                                                           v-model="formUserInfo.workState" placeholder="请选择求职状态">
                                                    <el-option label="请选择" value=""></el-option>
                                                    <el-option label="在校学生-实习中" value="4"></el-option>
                                                    <el-option label="在校学生-求职中" value="5"></el-option>
                                                    <el-option label="在校学生" value="6"></el-option>
                                                </el-select>
                                            </el-form-item>

                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="参加工作时间" v-if="!formUserInfo.jobTimeFlag"
                                                          prop="jobTime">
                                                <el-date-picker v-model="formUserInfo.jobTime" type="month"
                                                                value-format="timestamp"
                                                                :picker-options="pickerOptions" placeholder="请选择参加工作时间"
                                                                style="margin-right: 15px;width: 200px"></el-date-picker>
                                                <el-checkbox v-model="formUserInfo.jobTimeFlag">暂无工作经历</el-checkbox>
                                            </el-form-item>
                                            <el-form-item label="参加工作时间" v-else prop="jobTimeFlag">
                                                <el-checkbox v-model="formUserInfo.jobTimeFlag">暂无工作经历</el-checkbox>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-form-item label="婚姻状况" prop="maritalStatus">
                                        <el-col>
                                            <el-radio v-model="formUserInfo.maritalStatus" label="0" border>未婚
                                            </el-radio>
                                            <el-radio v-model="formUserInfo.maritalStatus" label="1" border>已婚已育
                                            </el-radio>
                                            <el-radio v-model="formUserInfo.maritalStatus" label="2" border>已婚未育
                                            </el-radio>
                                            <el-radio v-model="formUserInfo.maritalStatus" label="3" border>离异
                                            </el-radio>
                                        </el-col>
                                    </el-form-item>

                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="身份证号" prop="r6">
                                                <el-input v-model.trim="formUserInfo.r6" placeholder="请填写身份证号"
                                                          :maxlength="18"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12" v-if="resumeType == 1">
                                            <el-form-item label="驾驶证" prop="r5">
                                                <el-select v-model="formUserInfo.r5"

                                                           placeholder="请选择驾驶证">
                                                    <el-option label="无" value="无"></el-option>
                                                    <el-option label="A1" value="A1"></el-option>
                                                    <el-option label="A2" value="A2"></el-option>
                                                    <el-option label="A3" value="A3"></el-option>
                                                    <el-option label="B1" value="B1"></el-option>
                                                    <el-option label="B2" value="B2"></el-option>
                                                    <el-option label="C1" value="C1"></el-option>
                                                    <el-option label="C2" value="C2"></el-option>
                                                    <el-option label="C3" value="C3"></el-option>
                                                    <el-option label="C4" value="C4"></el-option>
                                                    <el-option label="C5" value="C5"></el-option>
                                                    <el-option label="D" value="D"></el-option>
                                                    <el-option label="E" value="E"></el-option>
                                                    <el-option label="F" value="F"></el-option>
                                                    <el-option label="M" value="M"></el-option>
                                                    <el-option label="N" value="N"></el-option>
                                                    <el-option label="P" value="P"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12" v-else>
                                            <el-form-item label="是否与其他单位签订三方协议" prop="tripartiteAgreement">
                                                <!--                                                <el-input v-model.trim="formAdvantage.tripartiteAgreement" placeholder="目前是否与其他单位签订三方协议（若签订请注明单位）"></el-input>-->
                                                <!-- 该信息时间并未保存在formUserInfo（piInfo中，但因为rule规则限制，所以先这样，保存时候会替换）-->

                                                <el-input v-model.trim="formUserInfo.tripartiteAgreement"
                                                          placeholder="目前是否与其他单位签订三方协议（若签订请注明单位）"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>

                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="身高" prop="r3">
                                                <el-input type="number" v-model.trim="formUserInfo.r3"
                                                          placeholder="请填写真实身高">
                                                    <template slot="append">CM</template>
                                                </el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="体重" prop="r4">
                                                <el-input type="number" v-model.trim="formUserInfo.r4"
                                                          placeholder="请填写真实体重">
                                                    <template slot="append">Kg</template>
                                                </el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>

                                    <el-row :gutter="20">

                                        <el-col :span="12">
                                            <el-form-item label="民族" prop="r2">
                                                <el-select v-model="formUserInfo.r2" placeholder="请选择民族">
                                                    <el-option label="汉族" value="汉族"></el-option>
                                                    <el-option label="满族" value="满族"></el-option>
                                                    <el-option label="蒙古族" value="蒙古族"></el-option>
                                                    <el-option label="回族" value="回族"></el-option>
                                                    <el-option label="藏族" value="藏族"></el-option>
                                                    <el-option label="维吾尔族" value="维吾尔族"></el-option>
                                                    <el-option label="苗族" value="苗族"></el-option>
                                                    <el-option label="彝族" value="彝族"></el-option>
                                                    <el-option label="壮族" value="壮族"></el-option>
                                                    <el-option label="布依族" value="布依族"></el-option>
                                                    <el-option label="侗族" value="侗族"></el-option>
                                                    <el-option label="瑶族" value="瑶族"></el-option>
                                                    <el-option label="白族" value="白族"></el-option>
                                                    <el-option label="土家族" value="土家族"></el-option>
                                                    <el-option label="哈尼族" value="哈尼族"></el-option>
                                                    <el-option label="哈萨克族" value="哈萨克族"></el-option>
                                                    <el-option label="傣族" value="傣族"></el-option>
                                                    <el-option label="黎族" value="黎族"></el-option>
                                                    <el-option label="傈僳族" value="傈僳族"></el-option>
                                                    <el-option label="佤族" value="佤族"></el-option>
                                                    <el-option label="畲族" value="畲族"></el-option>
                                                    <el-option label="高山族" value="高山族"></el-option>
                                                    <el-option label="拉祜族" value="拉祜族"></el-option>
                                                    <el-option label="水族" value="水族"></el-option>
                                                    <el-option label="东乡族" value="东乡族"></el-option>
                                                    <el-option label="纳西族" value="纳西族"></el-option>
                                                    <el-option label="景颇族" value="景颇族"></el-option>
                                                    <el-option label="柯尔克孜族" value="柯尔克孜族"></el-option>
                                                    <el-option label="土族" value="土族"></el-option>
                                                    <el-option label="达斡尔族" value="达斡尔族"></el-option>
                                                    <el-option label="仫佬族" value="仫佬族"></el-option>
                                                    <el-option label="羌族" value="羌族"></el-option>
                                                    <el-option label="布朗族" value="布朗族"></el-option>
                                                    <el-option label="撒拉族" value="撒拉族"></el-option>
                                                    <el-option label="毛南族" value="毛南族"></el-option>
                                                    <el-option label="仡佬族" value="仡佬族"></el-option>
                                                    <el-option label="锡伯族" value="锡伯族"></el-option>
                                                    <el-option label="阿昌族" value="阿昌族"></el-option>
                                                    <el-option label="普米族" value="普米族"></el-option>
                                                    <el-option label="朝鲜族" value="朝鲜族"></el-option>
                                                    <el-option label="塔吉克族" value="塔吉克族"></el-option>
                                                    <el-option label="怒族" value="怒族"></el-option>
                                                    <el-option label="乌孜别克族" value="乌孜别克族"></el-option>
                                                    <el-option label="俄罗斯族" value="俄罗斯族"></el-option>
                                                    <el-option label="鄂温克族" value="鄂温克族"></el-option>
                                                    <el-option label="德昂族" value="德昂族"></el-option>
                                                    <el-option label="保安族" value="保安族"></el-option>
                                                    <el-option label="裕固族" value="裕固族"></el-option>
                                                    <el-option label="京族" value="京族"></el-option>
                                                    <el-option label="塔塔尔族" value="塔塔尔族"></el-option>
                                                    <el-option label="独龙族" value="独龙族"></el-option>
                                                    <el-option label="鄂伦春族" value="鄂伦春族"></el-option>
                                                    <el-option label="赫哲族" value="赫哲族"></el-option>
                                                    <el-option label="门巴族" value="门巴族"></el-option>
                                                    <el-option label="珞巴族" value="珞巴族"></el-option>
                                                    <el-option label="基诺族" value="基诺族"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="政治面貌" prop="political">
                                                <el-select v-model="formUserInfo.political" placeholder="请选择政治面貌">
                                                    <el-option label="中共党员" value="中共党员"></el-option>
                                                    <el-option label="中共预备党员" value="中共预备党员"></el-option>
                                                    <el-option label="无党派人士" value="无党派人士"></el-option>
                                                    <el-option label="共青团员" value="共青团员" :disabled="formUserInfo.disabled"></el-option>
                                                    <el-option label="民革党员" value="民革党员"></el-option>
                                                    <el-option label="民盟盟员" value="民盟盟员"></el-option>
                                                    <el-option label="民建会员" value="民建会员"></el-option>
                                                    <el-option label="民进会员" value="民进会员"></el-option>
                                                    <el-option label="农工党党员" value="农工党党员"></el-option>
                                                    <el-option label="致公党党员" value="致公党党员"></el-option>
                                                    <el-option label="九三学社社员" value="九三学社社员"></el-option>
                                                    <el-option label="台盟盟员" value="台盟盟员"></el-option>
                                                    <el-option label="群众" value="群众"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="入党时间" prop="partyTime"
                                                          v-if="'中共党员'==formUserInfo.political||'中共预备党员'==formUserInfo.political">
                                                <el-date-picker v-model="formUserInfo.partyTime" type="date"
                                                                value-format="timestamp"
                                                                :picker-options="pickerOptionsDisabledAfterNow" placeholder="入党时间"
                                                                style="margin-right: 15px;width: 200px"></el-date-picker>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="外语水平"
                                                          prop="foreignLanguage">
                                                <el-select v-model="formUserInfo.foreignLanguage" placeholder="请选择外语水平">
                                                    <el-option label="无" value="无"></el-option>
                                                    <el-option label="四级" value="四级"></el-option>
                                                    <el-option label="六级" value="六级"></el-option>
                                                    <el-option label="专业四级" value="专业四级"></el-option>
                                                    <el-option label="专业八级" value="专业八级"></el-option>
                                                    <el-option label="雅思" value="雅思"></el-option>
                                                    <el-option label="托福" value="托福"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="计算机水平" prop="computerSkill">
                                                <el-select v-model="formUserInfo.computerSkill" placeholder="请选择计算机水平">
                                                    <el-option label="无" value="无"></el-option>
                                                    <el-option label="一般" value="一般"></el-option>
                                                    <el-option label="良好" value="良好"></el-option>
                                                    <el-option label="优秀" value="优秀"></el-option>
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <!-- <el-row :gutter="20">
                                        <el-col :span="12">


                                        </el-col>
                                         <el-col :span="12">
                                            <el-form-item label="职位调剂" prop="r1">
                                                <el-switch v-model="formUserInfo.r1" active-text="同意" inactive-text="不同意" active-value="1" inactive-value="2"></el-switch>
                                            </el-form-item>
                                        </el-col>
                                    </el-row> -->

                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="户口所在地" prop="homeTownCode">
                                                <el-cascader v-model="formUserInfo.homeTownCode" :options="areaList"
                                                             placeholder="请选择户口所在地"></el-cascader>
                                            </el-form-item>

                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="现居住城市" prop="liveCityCode">
                                                <el-cascader v-model="formUserInfo.liveCityCode" :options="areaList"
                                                             placeholder="请选择现居住城市"></el-cascader>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="现居住城市详细地址" prop="address">
                                                <el-input v-model.trim="formUserInfo.address" placeholder="街道/乡镇名称+小区楼栋/村落名称"
                                                          maxlength="200"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="联系方式" prop="phone">
                                                <el-input type="number" v-model.trim="formUserInfo.phone"
                                                          placeholder="请填写联系方式"
                                                          disabled></el-input>
                                            </el-form-item>

                                        </el-col>
                                    </el-row>
                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="电子邮箱" prop="email">
                                                <el-input v-model.trim="formUserInfo.email"
                                                          placeholder="请填写电子邮箱"></el-input>
                                            </el-form-item>
                                        </el-col>
                                        <el-col :span="12">
                                            <el-form-item label="紧急联系人" prop="r7">
                                                <el-input v-model.trim="formUserInfo.r7"
                                                          placeholder="请填写紧急联系人"></el-input>
                                            </el-form-item>

                                        </el-col>
                                    </el-row>
                                    <el-row :gutter="20">
                                        <el-col :span="12">
                                            <el-form-item label="联系人电话" prop="r8">
                                                <el-input type="number" v-model.trim="formUserInfo.r8"
                                                          placeholder="请填写联系人电话"></el-input>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>


                                    <el-form-item>
                                        <el-button type="primary" @click="submitForm('formUserInfo','edit','')">保存并更新
                                        </el-button>
                                        <el-button @click="cancelEdit('formUserInfo')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 个人优势 -->
                        <div class="section advantage" v-if="resumeType == 1">
                            <div class="title">个人优势<span class="bt">必填，否则不允许投递简历</span>
                                <div class="btnEdit" @click="edit('formAdvantage','edit','')"><i
                                    class="el-icon-edit-outline"></i>编辑
                                </div>
                            </div>
                            <div class="primary" v-if="!formAdvantageShow">
                                <pre class="txt">{{ formAdvantage.advantage }}</pre>
                            </div>
                            <div class="edit" v-if="formAdvantageShow">
                                <el-form class="form cl" :model="formAdvantage" :rules="advantageRules"
                                         ref="formAdvantage">
                                    <el-form-item prop="advantage">
                                        <el-input type="textarea" placeholder="请填写个人优势"
                                                  v-model="formAdvantage.advantage" maxlength="150"
                                                  show-word-limit/>
                                    </el-form-item>
                                    <el-form-item>
                                        <el-button type="primary" @click="submitForm('formAdvantage','edit','')">保存并更新
                                        </el-button>
                                        <el-button @click="cancelEdit('formAdvantage')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 主要研究方向及成果 -->
                        <div class="section majorResearchDirection" v-if="resumeType == 2">
                            <div class="title">主要研究方向及成果<span class="bt">必填，否则不允许投递简历</span>
                                <div class="btnEdit" @click="edit('majorResearchDirection','edit','')"><i
                                    class="el-icon-edit-outline"></i>编辑
                                </div>
                            </div>
                            <div class="primary" v-if="!majorResearchDirectionShow">
                                <pre class="txt">{{ formAdvantage.majorResearchDirection }}</pre>
                            </div>
                            <div class="edit" v-if="majorResearchDirectionShow">
                                <el-form class="form cl" :model="formAdvantage" :rules="advantageRules"
                                         ref="majorResearchDirection">
                                    <el-form-item prop="majorResearchDirection">
                                        <el-input type="textarea" placeholder="主要研究方向及成果"
                                                  v-model="formAdvantage.majorResearchDirection" maxlength="150"
                                                  show-word-limit/>
                                    </el-form-item>
                                    <el-form-item>
                                        <el-button type="primary"
                                                   @click="submitForm('majorResearchDirection','edit','')">保存并更新
                                        </el-button>
                                        <el-button @click="cancelEdit('majorResearchDirection')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 自我综合评价 -->
                        <div class="section selfEvaluation" v-if="resumeType == 2">
                            <div class="title">自我综合评价<span class="bt">必填，否则不允许投递简历</span>
                                <div class="btnEdit" @click="edit('selfEvaluation','edit','')"><i
                                    class="el-icon-edit-outline"></i>编辑
                                </div>
                            </div>
                            <div class="primary" v-if="!selfEvaluationShow">
                                <pre class="txt">{{ formAdvantage.selfEvaluation }}</pre>
                            </div>
                            <div class="edit" v-if="selfEvaluationShow">
                                <el-form class="form cl" :model="formAdvantage" :rules="advantageRules"
                                         ref="selfEvaluation">
                                    <el-form-item prop="selfEvaluation">
                                        <el-input type="textarea" placeholder="请填写自我综合评价"
                                                  v-model="formAdvantage.selfEvaluation" maxlength="150"
                                                  show-word-limit/>
                                    </el-form-item>
                                    <el-form-item>
                                        <el-button type="primary" @click="submitForm('selfEvaluation','edit','')">
                                            保存并更新
                                        </el-button>
                                        <el-button @click="cancelEdit('selfEvaluation')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 期望职位 -->
                        <div class="section wantJob" v-if="resumeType == 1">
                            <div class="title">期望职位<span class="bt">必填，否则不允许投递简历</span>
                                <div v-if="wantJobList.length<2" class="btnEdit" @click="edit('formWantJob','add','')">
                                    <i
                                        class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formWantJobShow">
                                <ul>
                                    <li v-for="(item,index) in wantJobList" :key="index">
                                        <div class="txt">
                                            <div class="t">
                                                {{ item.workNature_dictText[item.workNature_dictText.length - 1] }}
                                                <div class="btnEdit" @click="edit('formWantJob','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formWantJob',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                            <dl>
                                                <dd>期望行业:
                                                    {{
                                                        item.workIndustry_dictText[item.workIndustry_dictText.length - 1]
                                                    }}
                                                </dd>
                                                <dd>工作城市: {{ item.cityId_dictText }}</dd>
                                                <dd>薪资要求: {{ item.money1 }}</dd>
                                                <dd>求职类型: {{ item.workType_dictText }}</dd>
                                            </dl>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formWantJobShow">
                                <el-form class="form cl" :model="formWantJob" :rules="wantJobRules" ref="formWantJob">
                                    <div class="left fl">
                                        <el-form-item label="期望职位" prop="workNatureCode">
                                            <el-cascader v-model="formWantJob.workNatureCode" :options="jobPosition"
                                                         :show-all-levels="false"
                                                         placeholder="请选择期望职位" style="width: 100%"></el-cascader>
                                        </el-form-item>
                                        <el-form-item label="期望地点" prop="cityStringCode">
                                            <el-cascader v-model="formWantJob.cityStringCode" :options="areaList"
                                                         placeholder="请选择期望地点"
                                                         style="width: 100%;"></el-cascader>
                                        </el-form-item>
                                        <el-form-item label="求职类型" prop="workType">
                                            <el-col>
                                                <el-radio v-model="formWantJob.workType" label="0" border>全职</el-radio>
                                                <el-radio v-model="formWantJob.workType" label="1" border>兼职</el-radio>
                                                <el-radio v-model="formWantJob.workType" label="2" border>实习</el-radio>
                                            </el-col>
                                        </el-form-item>
                                    </div>
                                    <div class="right fr">
                                        <el-form-item label="期望行业" prop="workIndustryCode">
                                            <el-cascader v-model="formWantJob.workIndustryCode" :options="industryList"
                                                         :show-all-levels="false" placeholder="请选择期望行业"
                                                         style="width: 100%"></el-cascader>
                                        </el-form-item>
                                        <el-form-item label="薪资要求范围" prop="money">
                                            <el-select v-model="formWantJob.money" placeholder="请选择薪资要求范围"
                                                       style="width: 100%">
                                                <el-option v-for="item in moneyOptions" :key="item.value"
                                                           :label="item.label"
                                                           :value="item.value"></el-option>
                                            </el-select>
                                        </el-form-item>
                                    </div>
                                    <div class="cl"></div>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formWantJob.id"
                                                   @click="submitForm('formWantJob','edit')">保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formWantJob','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formWantJob')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 工作/实习经历 -->
                        <div class="section work">
                            <div class="title">{{resumeType == 2 ? '实习经历' : '工作经历'}}
                            <span class="bt">必填，由近及远，填写完整
                                <span>{{resumeType == 2 ? '' : '（毕业后至今所有工作经历）'}}</span>
                                ，否则不允许投递简历</span>
                                <div class="btnEdit" @click="edit('formWork','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formWorkShow">
                                <ul>
                                    <li v-for="(item,index) in workList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.companyName }}
                                                <span>{{ item.workStartTime_dictText }} - {{
                                                        item.workEndTime === '至今' ? '至今' : item.workEndTime_dictText
                                                    }}</span>
                                                <div class="btnEdit" @click="edit('formWork','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formWork',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                            <div class="dsc"><span>{{ item.positionName_dictText[1] }}</span></div>
                                            <dl style="margin: 0" v-if="resumeType == 1">
                                                <dd>税前月薪: {{ item.salary }}元/月</dd>
                                                <!-- <dd>技能标签: <span v-for="(x,y) in item.workSignCode" :key="y">{{x}}</span></dd> -->
                                            </dl>
                                            <div class="dsc" style="margin-top: 5px">
                                                <p v-html="item.workContent"></p>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formWorkShow">
                                <el-form class="form cl" :model="formWork" :rules="formWorkRules" ref="formWork">
                                    <div class="left fl">
                                        <el-form-item label="公司名称" prop="companyName">
                                            <el-input v-model.trim="formWork.companyName" placeholder="请填写公司名称"
                                                      style="width: 100%"></el-input>
                                        </el-form-item>

                                        <el-form-item label="所属部门" prop="r2">
                                            <el-input v-model.trim="formWork.r2" placeholder="请填写所属部门"
                                                      style="width: 100%"></el-input>
                                        </el-form-item>


                                        <el-form-item label="所任职位" prop="positionNameCode">
                                            <el-cascader ref="jobPosition" v-model="formWork.positionNameCode"
                                                         :options="jobPosition"
                                                         filterable @change="chooseJobPosition" :show-all-levels="false"
                                                         placeholder="请选择所任职位"
                                                         style="width: 100%"></el-cascader>
                                        </el-form-item>

                                      <el-form-item label="其他职位说明"  prop="otherPosition">
                                        <el-input v-model.trim="formWork.otherPosition" placeholder="如所任职位选择其他，请填写当前具体职位"
                                                  style="width: 100%" :readonly="otherPositionReadOnly"></el-input>
                                      </el-form-item>

                                        <el-form-item label="单位规模（人）" v-if="resumeType == 1" prop="r3">
                                            <el-select v-model="formWork.r3" placeholder="请选择单位规模">
                                                <el-option label="20人以下" value="20人以下"></el-option>
                                                <el-option label="20-99人" value="20-99人"></el-option>
                                                <el-option label="100-299人" value="100-299人"></el-option>
                                                <el-option label="300-499人" value="300-499人"></el-option>
                                                <el-option label="500-999人" value="500-999人"></el-option>
                                                <el-option label="1000-9999人" value="1000-9999人"></el-option>
                                                <el-option label="10000人以上" value="10000人以上"></el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-form-item label="下属人数" v-if="resumeType == 1" prop="r5">
                                            <el-input type="number" v-model.trim="formWork.r5" placeholder="请填写下属人数"
                                                      style="width: 100%"></el-input>
                                        </el-form-item>
                                      <el-form-item label="离职原因" v-if="resumeType == 1" prop="r6">
                                        <el-input v-model.trim="formWork.r6" placeholder="请填写离职原因"
                                                  style="width: 100%"></el-input>
                                      </el-form-item>
                                        <!-- <el-form-item label="该份工作需要的技能">
                                            <el-select v-model="formWork.workSignCode" multiple placeholder="该份工作需要的技能" style="width: 100%">
                                                <el-option v-for="(item,index) in skills" :key="index" :label="item.label" :value="item.value"></el-option>
                                            </el-select>
                                        </el-form-item> -->
                                    </div>
                                    <div class="right fr">
                                        <el-form-item label="单位类型" prop="r1">
                                            <!--                                            <el-cascader v-model="formWork.r1" :options="industryList" :show-all-levels="false"-->
                                            <!--                                                placeholder="请选择单位类型" style="width: 100%"></el-cascader>-->

                                            <el-select v-model="formWork.r1" placeholder="请选择单位类型" style="width: 100%">
                                                <el-option label="国企" value="国企"></el-option>
                                                <el-option label="外企" value="外企"></el-option>
                                                <el-option label="合资" value="合资"></el-option>
                                                <el-option label="民营" value="民营"></el-option>
                                                <el-option label="上市公司" value="上市公司"></el-option>
                                                <el-option label="股份制企业" value="股份制企业"></el-option>
                                                <el-option label="事业单位" value="事业单位"></el-option>
                                                <el-option label="政府及非盈利机构" value="政府及非盈利机构"></el-option>
                                                <el-option label="其他" value="其他"></el-option>
                                            </el-select>
                                        </el-form-item>

<!--                                        <el-form-item label="在职时间" prop="workTime">
                                            <el-date-picker v-model="formWork.workTime" type="monthrange"
                                                            value-format="timestamp"
                                                            :unlink-panels="true" :picker-options="pickerOptions"
                                                            range-separator="至"
                                                            start-placeholder="入职时间" end-placeholder="离职时间"
                                                            style="width: 100%"></el-date-picker>
                                        </el-form-item>-->

                                      <el-form-item label="入职时间" prop="workStartTime">
                                        <el-date-picker type="month" value-format="yyyy-MM-dd HH:mm:ss"
                                                        :picker-options="pickerOptions"
                                                        placeholder="请选择入职时间"
                                                        v-model="formWork.workStartTime"></el-date-picker>
                                      </el-form-item>

                                      <el-form-item label="离职时间" prop="workEndTime">
                                        <div class="el-input">
                                          <el-checkbox v-model="isNow" @change="toggleNow">至今</el-checkbox>
                                          <el-date-picker type="month" value-format="yyyy-MM-dd"
                                                          :picker-options="pickerOptions"
                                                          placeholder="请选择离职时间"
                                                          style="width: 60% !important; margin-left: 20px;"
                                                          v-if="!isNow"
                                                          v-model="formWork.workEndTime"></el-date-picker>
                                        </div>
                                      </el-form-item>



                                        <el-form-item label="税前月薪/元" prop="salary" v-if="resumeType == 1">
                                            <el-input type="number" v-model.trim="formWork.salary"
                                                      placeholder="请填写税前月薪/元"
                                                      style="width: 100%"></el-input>
                                        </el-form-item>

                                        <el-form-item label="上级职位" v-if="resumeType == 1" prop="r4">
                                            <el-input v-model.trim="formWork.r4" placeholder="请填写上级职位"
                                                      style="width: 100%"></el-input>
                                        </el-form-item>
                                    </div>
                                    <div class="cl" style="height: 20px"></div>
                                    <el-form-item label="工作内容" prop="workContent">
                                        <el-input v-model="formWork.workContent" type="textarea"
                                                  placeholder="请填写工作内容，为保护个人隐私，请不要填写手机号、QQ、微信等联系方式" maxlength="1600"
                                                  show-word-limit/>
                                    </el-form-item>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formWork.id"
                                                   @click="submitForm('formWork','edit')">保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formWork','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formWork')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>


                        <!-- 主要工作业绩 begin -->
                        <div class="section majorWorkPerformance" v-if="resumeType == 1">
                            <div class="title">主要工作业绩<span class="bt">必填，否则不允许投递简历</span>
                                <div class="btnEdit" @click="edit('majorWorkPerformance','edit','')"><i
                                    class="el-icon-edit-outline"></i>编辑
                                </div>
                            </div>
                            <div class="primary" v-if="!majorWorkPerformanceShow">
                                <pre class="txt">{{ formAdvantage.majorWorkPerformance }}</pre>
                            </div>
                            <div class="edit" v-if="majorWorkPerformanceShow">
                                <el-form class="form cl" :model="formAdvantage" :rules="advantageRules"
                                         ref="majorWorkPerformance">
                                    <el-form-item prop="majorWorkPerformance">
                                        <el-input type="textarea" placeholder="主要工作业绩"
                                                  v-model="formAdvantage.majorWorkPerformance" maxlength="150"
                                                  show-word-limit/>
                                    </el-form-item>
                                    <el-form-item>
                                        <el-button type="primary" @click="submitForm('majorWorkPerformance','edit','')">
                                            保存并更新
                                        </el-button>
                                        <el-button @click="cancelEdit('majorWorkPerformance')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 主要工作业绩 end -->


                        <!-- 教育经历 -->
                        <div class="section education">
                            <div class="title">教育经历<span class="bt">必填且需从高中/中专填写：高中/中专(必填)、本科/大专(如有)、研究生（如有），否则不允许投递</span>
                                <div class="btnEdit" @click="edit('formEducation','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formEducationShow">
                                <ul>
                                    <li v-for="(item,index) in educationList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.schoolName }}
                                                <span>{{ item.startEduTime_dictText }} - {{
                                                        item.endEduTime_dictText
                                                    }}</span>
                                                <div class="btnEdit" @click="edit('formEducation','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formEducation',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                            <div class="dsc">
                                                <span>{{ item.major }}</span>
                                                <span>{{ item.eduLevel_dictText }}</span>
                                                <span v-if="item.r1">{{ item.r1_dictText }}</span>
                                                <span v-if="item.recruitmentFlag=='0'">统招</span>
                                                <span v-if="item.recruitmentFlag=='1'">非统招</span>
                                                <span v-if="item.recruitmentFlag=='2'">国外学历</span>
                                                <span v-if="item.r2">{{ item.r2_dictText }}</span>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formEducationShow">
                                <el-form class="form cl" :model="formEducation" :rules="formEducationRules"
                                         ref="formEducation">
                                    <div class="left fl">
                                        <el-form-item label="学校名称" prop="schoolName">
                                            <el-select v-model="formEducation.schoolName" allow-create filterable remote :remote-method="findSchoolDict" placeholder="请选择或者输入学校名称" @blur="onSchoolNameBlur($event)" style="width: 100%">
                                                <el-option v-for="item in schoolList" :key="item.id" :value="item.itemText" :label="item.itemText"></el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-form-item label="所学专业(第二学位可一并填写，如：物流管理/工商管理)" prop="major">
                                            <el-select v-model="formEducation.major" :multiple-limit="2" remote :remote-method="findMajorDict" allow-create multiple filterable placeholder="请选择所学专业"  @blur="onMajorNameBlur($event)" style="width: 100%">
                                                <el-option v-for="item in majorList" :key="item.id" :label="item.itemText" :value="item.itemText"></el-option>
                                            </el-select>
                                        </el-form-item>

                                        <!-- 2022年3月11日14:01:07 按照客户要求去掉-->
                                        <el-form-item label="是否统招" v-if="false"
                                                      prop="recruitmentFlag">
                                            <el-col>
                                                <el-radio v-model="formEducation.recruitmentFlag" label="0" border>统招
                                                </el-radio>
                                                <el-radio v-model="formEducation.recruitmentFlag" label="1" border>非统招
                                                </el-radio>
                                                <el-radio v-model="formEducation.recruitmentFlag" label="2" border>
                                                    国外学历
                                                </el-radio>
                                            </el-col>
                                        </el-form-item>

                                        <el-form-item label="是否全日制" prop="r2">
                                            <el-col>
                                                <el-switch v-model="formEducation.r2" active-text="是" inactive-text="不是"
                                                           active-value="1"
                                                           inactive-value="2"></el-switch>
                                            </el-col>
                                        </el-form-item>

                                        <el-form-item label="学位" prop="r1">
                                          <el-select v-model="formEducation.r1" placeholder="请选择学位"
                                                     style="width: 100%">
                                            <el-option label="学士" value="1"></el-option>
                                            <el-option label="硕士" value="2"></el-option>
                                            <el-option label="博士" value="3"></el-option>
                                            <el-option label="无" value="0"></el-option>
                                            <!-- 2022年3月30日15:26:56  添加-->
                                          </el-select>
                                        </el-form-item>

                                    </div>
                                    <div class="right fr">
<!--                                        <el-form-item label="就读时间" prop="studyTime">
                                            <el-date-picker v-model="formEducation.studyTime" type="monthrange"
                                                            value-format="timestamp"
                                                            :unlink-panels="true" range-separator="至"
                                                            start-placeholder="入学时间"
                                                            end-placeholder="毕业时间" style="width: 100%"></el-date-picker>
                                        </el-form-item>-->
                                        <el-form-item label="入学时间" prop="startEduTime">
                                          <el-date-picker type="month" value-format="timestamp"
                                                          :picker-options="pickerOptionsDisabledAfterNow"
                                                          placeholder="请选择入学时间"
                                                          v-model="formEducation.startEduTime"></el-date-picker>
                                        </el-form-item>
                                        <el-form-item label="毕业时间" prop="endEduTime">
                                          <el-date-picker type="month" value-format="timestamp"
                                                          :picker-options="pickerOptions"
                                                          placeholder="请选择毕业时间"
                                                          v-model="formEducation.endEduTime"></el-date-picker>
                                        </el-form-item>

                                        <el-form-item label="学历" prop="eduLevel">
                                            <el-select v-model="formEducation.eduLevel" placeholder="请选择学历"
                                                       style="width: 100%">
                                                <el-option label="博士" value="7"></el-option>
                                                <el-option label="MBA/EMBA" value="6"></el-option>
                                                <el-option label="研究生" value="5"></el-option>
                                                <el-option label="本科" value="4"></el-option>
                                                <el-option label="大专" value="3"></el-option>
                                                <el-option label="中专/中技" value="2"></el-option>
                                                <el-option label="高中" value="1"></el-option>
                                                <el-option label="初中" value="0"></el-option>
                                            </el-select>
                                        </el-form-item>

                                        <!-- <el-form-item label="海外学习经历" prop="overseasFlag">
                                            <el-col>
                                                <el-radio v-model="formEducation.overseasFlag" label="true" border>有海外学习经历</el-radio>
                                                <el-radio v-model="formEducation.overseasFlag" label="false" border>无海外学习经历</el-radio>
                                            </el-col>
                                        </el-form-item> -->
                                    </div>
                                    <div class="cl"></div>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formEducation.id"
                                                   @click="submitForm('formEducation','edit')">
                                            保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formEducation','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formEducation')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 项目经历 -->
                        <div class="section project" v-if="resumeType == 1">
                            <div class="title">项目经历
                                <!--                                <span class="bt">必填，否则不允许投递简历</span>-->
                                <div class="btnEdit" @click="edit('formProject','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formProjectShow">
                                <ul>
                                    <li v-for="(item,index) in projectList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.projectName }}
                                                <span>{{ item.startTime_dictText }} - {{ item.endTime_dictText }}</span>
                                                <div class="btnEdit" @click="edit('formProject','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formProject',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                            <div class="dsc">
                                                <div class="tt">项目描述</div>
                                                <p v-html="item.projectDescribe"></p>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formProjectShow">
                                <el-form class="form cl" label-width="80px" :model="formProject"
                                         :rules="formProjectRules"
                                         ref="formProject">
                                    <el-form-item label="项目名称" prop="projectName">
                                        <el-input v-model.trim="formProject.projectName"
                                                  placeholder="请填写项目名称"></el-input>
                                    </el-form-item>
                                    <el-form-item label="项目职务" prop="r1">
                                      <el-input v-model.trim="formProject.r1"
                                                placeholder="请填写项目职务"></el-input>
                                    </el-form-item>
                                    <el-form-item label="所在公司" prop="r2">
                                      <el-input v-model.trim="formProject.r2"
                                                placeholder="请填写项目所在公司"></el-input>
                                    </el-form-item>

                                    <el-form-item label="开始时间" prop="startTime">
                                      <el-date-picker type="month" value-format="yyyy-MM-dd"
                                                      :picker-options="pickerOptionsDisabledAfterNow"
                                                      placeholder="请选择开始时间"
                                                      v-model="formProject.startTime"></el-date-picker>
                                    </el-form-item>
                                    <el-form-item label="结束时间" prop="endTime">
                                      <el-date-picker type="month" value-format="yyyy-MM-dd"
                                                      :picker-options="pickerOptions"
                                                      placeholder="请选择结束时间"
                                                      v-model="formProject.endTime"></el-date-picker>
                                    </el-form-item>

                                    <el-form-item label="项目描述" prop="projectDescribe">
                                        <el-input type="textarea" placeholder="请填写项目描述"
                                                  v-model="formProject.projectDescribe"
                                                  maxlength="3000" show-word-limit/>
                                    </el-form-item>
                                    <el-form-item label="项目职责" prop="r3">
                                      <el-input type="textarea" v-model.trim="formProject.r3"
                                                placeholder="请填写项目职责"></el-input>
                                    </el-form-item>
                                    <el-form-item label="项目业绩" prop="r4">
                                      <el-input type="textarea" v-model.trim="formProject.r4"
                                                placeholder="请填写项目业绩"></el-input>
                                    </el-form-item>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formProject.id"
                                                   @click="submitForm('formProject','edit')">保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formProject','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formProject')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 培训经历 -->
                        <div class="section train" v-if="resumeType == 1">
                            <div class="title">培训经历
                                <!--                                <span class="bt">必填，否则不允许投递简历</span>-->
                                <div class="btnEdit" @click="edit('formTrain','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formTrainShow">
                                <ul>
                                    <li v-for="(item,index) in trainList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.mechanismName }}
                                                <div class="btnEdit" @click="edit('formTrain','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formTrain',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                            <div class="dsc">
                                                <span>{{ item.curriculum }}</span><span>{{ item.startTime_dictText }} - {{
                                                    item.endTime_dictText
                                                }}</span>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formTrainShow">
                                <el-form class="form cl" label-width="80px" :model="formTrain" :rules="formTrainRules"
                                         ref="formTrain">
<!--                                    <el-form-item label="培训时间" prop="time">
                                        <el-date-picker v-model="formTrain.time" type="monthrange"
                                                        value-format="timestamp"
                                                        :unlink-panels="true" :picker-options="pickerOptions"
                                                        range-separator="至"
                                                        start-placeholder="开始时间"
                                                        end-placeholder="结束时间"></el-date-picker>
                                    </el-form-item>-->
                                    <el-form-item label="开始时间" prop="startTime">
                                      <el-date-picker type="month" value-format="yyyy-MM-dd HH:mm:ss"
                                                      :picker-options="pickerOptionsDisabledAfterNow"
                                                      placeholder="请选择开始时间"
                                                      v-model="formTrain.startTime"></el-date-picker>
                                    </el-form-item>
                                    <el-form-item label="结束时间" prop="endTime">
                                      <el-date-picker type="month" value-format="yyyy-MM-dd HH:mm:ss"
                                                      :picker-options="pickerOptions"
                                                      placeholder="请选择结束时间"
                                                      v-model="formTrain.endTime"></el-date-picker>
                                    </el-form-item>
                                    <el-form-item label="培训机构" prop="mechanismName">
                                        <el-input v-model.trim="formTrain.mechanismName"
                                                  placeholder="请填写培训机构"></el-input>
                                    </el-form-item>
                                    <el-form-item label="培训课程" prop="curriculum">
                                        <el-input v-model.trim="formTrain.curriculum" placeholder="请填写培训课程"></el-input>
                                    </el-form-item>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formTrain.id"
                                                   @click="submitForm('formTrain','edit')">保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formTrain','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formTrain')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 语言能力 -->
                        <div class="section language" v-if="resumeType == 1">
                            <div class="title">语言能力<span class="bt">必填，否则不允许投递简历</span>
                                <div class="btnEdit" @click="edit('formLanguage','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formLanguageShow">
                                <ul>
                                    <li v-for="(item,index) in languageList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.type }}
                                                <div class="btnEdit" @click="edit('formLanguage','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formLanguage',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                            <div class="dsc">
                                                <span>听说能力：{{
                                                        item.oralLanguageLevel
                                                    }}</span><span>读写能力：{{ item.readingLevel }}</span>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formLanguageShow">
                                <el-form class="form cl" label-width="80px" :model="formLanguage"
                                         :rules="formLanguageRules"
                                         ref="formLanguage">
                                    <el-form-item label="语种" prop="type">
                                        <el-select v-model="formLanguage.type" placeholder="请选择语种">
                                            <el-option label="英语" value="英语"></el-option>
                                            <el-option label="汉语" value="汉语"></el-option>
                                            <el-option label="日语" value="日语"></el-option>
                                            <el-option label="法语" value="法语"></el-option>
                                            <el-option label="德语" value="德语"></el-option>
                                            <el-option label="俄语" value="俄语"></el-option>
                                            <el-option label="韩语/朝鲜语" value="韩语/朝鲜语"></el-option>
                                            <el-option label="西班牙语" value="西班牙语"></el-option>
                                            <el-option label="葡萄牙语" value="葡萄牙语"></el-option>
                                            <el-option label="阿拉伯语" value="阿拉伯语"></el-option>
                                            <el-option label="意大利语" value="意大利语"></el-option>
                                            <el-option label="瑞典语" value="瑞典语"></el-option>
                                            <el-option label="泰国语" value="泰国语"></el-option>
                                            <el-option label="波兰语" value="波兰语"></el-option>
                                            <el-option label="荷兰语" value="荷兰语"></el-option>
                                            <el-option label="捷克语" value="捷克语"></el-option>
                                            <el-option label="拉丁语" value="拉丁语"></el-option>
                                            <el-option label="挪威语" value="挪威语"></el-option>
                                            <el-option label="世界语" value="世界语"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="听说能力" prop="oralLanguageLevel">
                                        <el-select v-model="formLanguage.oralLanguageLevel" placeholder="请选择听说能力">
                                            <el-option label="一般" value="一般"></el-option>
                                            <el-option label="良好" value="良好"></el-option>
                                            <el-option label="熟练" value="熟练"></el-option>
                                            <el-option label="精通" value="精通"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="读写能力" prop="readingLevel">
                                        <el-select v-model="formLanguage.readingLevel" placeholder="请选择读写能力">
                                            <el-option label="一般" value="一般"></el-option>
                                            <el-option label="良好" value="良好"></el-option>
                                            <el-option label="熟练" value="熟练"></el-option>
                                            <el-option label="精通" value="精通"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formLanguage.id"
                                                   @click="submitForm('formLanguage','edit')">保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formLanguage','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formLanguage')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 职业特长与技能 -->
                        <div class="section skill" v-if="resumeType == 1">
                            <div class="title">
                                职称
                                <!--                                职业特长与技能-->
                                <!--                                <span class="bt">必填，否则不允许投递简历</span>-->
                                <div class="btnEdit" @click="edit('formSkill','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formSkillShow">
                                <ul>
                                    <li v-for="(item,index) in skillList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.name }}
                                                <span>{{ item.r1 }}</span>
                                                <span>{{ item.r2 }}</span>
                                                <div class="btnEdit" @click="edit('formSkill','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formSkill',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                            <!--                                            <div class="dsc"><span>掌握程度：{{item.level}}</span><span>使用时长：{{item.time}}个月</span></div>-->
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formSkillShow">
                                <el-form class="form cl" label-width="80px" :model="formSkill" :rules="formSkillRules"
                                         ref="formSkill">
                                    <el-form-item label="职称名称" prop="name">
                                        <el-input v-model.trim="formSkill.name" placeholder="请填写职称名称"></el-input>
                                    </el-form-item>
                                  <el-form-item label="获得时间" prop="r1">
                                    <el-date-picker v-model="formSkill.r1" type="month"
                                                    value-format="yyyy-MM"
                                                    :picker-options="pickerOptionsDisabledAfterNow"
                                                    placeholder="选择获得时间"></el-date-picker>
                                  </el-form-item>
                                  <el-form-item label="获得单位" prop="r2">
                                    <el-input v-model.trim="formSkill.r2"
                                              placeholder="请填写获得单位"></el-input>
                                  </el-form-item>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formSkill.id"
                                                   @click="submitForm('formSkill','edit')">保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formSkill','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formSkill')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 证书 -->
                        <div class="section certificate">
                            <div class="title">证书
                                <!--                                <span class="bt">必填，否则不允许投递简历</span>-->
                                <div class="btnEdit" @click="edit('formCertificate','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formCertificateShow">
                                <ul>
                                    <li v-for="(item,index) in certificateList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.name }}
                                                <span>{{ item.time_dictText }}</span>
                                                <span>{{ item.licenseIssuingUnit }}</span>
                                                <div class="btnEdit" @click="edit('formCertificate','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formCertificate',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formCertificateShow">
                                <el-form class="form cl" label-width="80px" :model="formCertificate"
                                         :rules="formCertificateRules"
                                         ref="formCertificate">
                                    <el-form-item label="证书名称" prop="name">
                                        <el-input v-model.trim="formCertificate.name" placeholder="请填写证书名称"></el-input>
                                    </el-form-item>
                                    <el-form-item label="获得时间" prop="time">
                                        <el-date-picker v-model="formCertificate.time" type="month"
                                                        value-format="timestamp"
                                                        :picker-options="pickerOptionsDisabledAfterNow"
                                                        placeholder="选择获得时间"></el-date-picker>
                                    </el-form-item>
                                    <el-form-item label="发证机关" prop="licenseIssuingUnit">
                                        <el-input v-model.trim="formCertificate.licenseIssuingUnit"
                                                  placeholder="请填写发证机关"></el-input>
                                    </el-form-item>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formCertificate.id"
                                                   @click="submitForm('formCertificate','edit')">
                                            保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formCertificate','add')">
                                            保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formCertificate')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>

                        <!-- 家庭成员 -->
                        <div class="section family">
                            <div class="title">家庭成员及重要社会关系<span class="bt">家庭成员需填写完整，父亲、母亲、配偶、子女为必填（如有），否则不允许投递</span>
                                <div class="btnEdit" @click="edit('formFamily','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formFamilyShow">
                                <ul>
                                    <li v-for="(item,index) in familyList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.name }}
                                                <span>({{ item.appellation }})</span>
                                                <div class="btnEdit" @click="edit('formFamily','edit',item.id)"><i
                                                    class="el-icon-edit-outline"></i>编辑
                                                </div>
                                                <div class="btnEdit" @click="delect('formFamily',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                            </div>

                                            <div class="dsc">
                                                <span v-if="item.age && resumeType == 1">{{ item.age }}岁</span>
                                                <span v-if="item.politics">{{ item.politics }}</span>
                                                <span v-if="item.company">{{ item.company }}</span>
                                                <span v-if="item.position">{{ item.position }}</span>
                                                <span v-if="item.remark">{{ item.remark }}</span>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formFamilyShow">
                                <el-form class="form cl" label-width="80px" label-position="top" :model="formFamily"
                                         :rules="formFamilyRules" ref="formFamily">

                                    <div class="left fl">
                                        <el-form-item label="称谓" prop="appellation">
                                            <!--                                            <el-input v-model.trim="formFamily.appellation" placeholder="请填写称谓"></el-input>-->

                                            <!--                                            爷爷奶奶姥爷姥姥去掉，换成：丈夫、妻子、儿子、女儿-->
                                            <el-select v-model="formFamily.appellation" placeholder="请选择称谓"
                                                       style="width: 100%">
                                                <el-option label="父亲" value="父亲"></el-option>
                                                <el-option label="母亲" value="母亲"></el-option>
                                                <el-option label="丈夫" value="丈夫"></el-option>
                                                <el-option label="妻子" value="妻子"></el-option>
                                                <el-option label="儿子" value="儿子"></el-option>
                                                <el-option label="女儿" value="女儿"></el-option>
                                                <!--                                                <el-option label="爷爷" value="爷爷"></el-option>-->
                                                <!--                                                <el-option label="奶奶" value="奶奶"></el-option>-->
                                                <!--                                                <el-option label="姥爷" value="姥爷"></el-option>-->
                                                <!--                                                <el-option label="姥姥" value="姥姥"></el-option>-->

                                            </el-select>
                                        </el-form-item>
                                        <el-form-item label="出生年月" prop="birthday">
                                            <el-date-picker v-model="formFamily.birthday" type="month"
                                                            value-format="timestamp"
                                                            :picker-options="pickerOptionsDisabledAfterNow"
                                                            placeholder="选择出生年月"></el-date-picker>
                                        </el-form-item>
                                        <!-- <el-form-item label="年龄" v-if="resumeType == 1"  prop="age">
                                            <el-input type="number" v-model.trim="formFamily.age" placeholder="请填写年龄"></el-input>
                                        </el-form-item> -->
                                        <el-form-item label="文化程度" prop="education">
                                            <el-select v-model="formFamily.education" placeholder="请选择文化程度">
                                                <el-option label="博士" value="7"></el-option>
                                                <el-option label="MBA/EMBA" value="6"></el-option>
                                                <el-option label="研究生" value="5"></el-option>
                                                <el-option label="本科" value="4"></el-option>
                                                <el-option label="大专" value="3"></el-option>
                                                <el-option label="中专/中技" value="2"></el-option>
                                                <el-option label="高中" value="1"></el-option>
                                                <el-option label="初中" value="0"></el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-form-item label="单位" prop="company">
                                            <el-input v-model.trim="formFamily.company" placeholder="请填写单位"></el-input>
                                        </el-form-item>
                                        <el-form-item label="联系电话" prop="phone">
                                            <el-input v-model.trim="formFamily.phone" placeholder="请填写联系电话"></el-input>
                                        </el-form-item>

                                    </div>
                                    <div class="right fr">
                                        <el-form-item label="姓名" prop="name">
                                            <el-input v-model.trim="formFamily.name" placeholder="请填写姓名"></el-input>
                                        </el-form-item>

                                        <el-form-item label="政治面貌" prop="politics">
                                            <el-select v-model="formFamily.politics" placeholder="请选择政治面貌">
                                                <el-option label="中共党员" value="中共党员"></el-option>
                                                <el-option label="中共预备党员" value="中共预备党员"></el-option>
                                                <el-option label="无党派人士" value="无党派人士"></el-option>
                                                <el-option label="共青团员" value="共青团员" :disabled="formFamily.disabled"></el-option>
                                                <el-option label="民革党员" value="民革党员"></el-option>
                                                <el-option label="民盟盟员" value="民盟盟员"></el-option>
                                                <el-option label="民建会员" value="民建会员"></el-option>
                                                <el-option label="民进会员" value="民进会员"></el-option>
                                                <el-option label="农工党党员" value="农工党党员"></el-option>
                                                <el-option label="致公党党员" value="致公党党员"></el-option>
                                                <el-option label="九三学社社员" value="九三学社社员"></el-option>
                                                <el-option label="台盟盟员" value="台盟盟员"></el-option>
                                                <el-option label="群众" value="群众"></el-option>
                                            </el-select>
                                        </el-form-item>

                                        <el-form-item label="职位" prop="position">
                                            <el-input v-model.trim="formFamily.position" placeholder="请填写职位"></el-input>
                                        </el-form-item>
                                        <el-form-item label="备注">
                                            <el-input v-model.trim="formFamily.remark" placeholder="请填写备注"></el-input>
                                        </el-form-item>

                                    </div>

                                    <div class="cl"></div>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" v-if="formFamily.id"
                                                   @click="submitForm('formFamily','edit')">保存并更新
                                        </el-button>
                                        <el-button type="primary" v-else @click="submitForm('formFamily','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formFamily')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>

                        <!-- 附件 -->
                        <div class="section enclosure">
                            <div class="title">附件
                                <div class="btnEdit" @click="edit('formEnclosure','add','')"><i
                                    class="el-icon-circle-plus-outline"></i>添加
                                </div>
                            </div>
                            <div class="primary" v-if="!formEnclosureShow">
                                <ul>
                                    <li v-for="(item,index) in fileList" :key="index">
                                        <div class="txt">
                                            <div class="t">{{ item.fileRealName }}
                                                <div class="btnEdit" @click="delect('formEnclosure',item.id)"><i
                                                    class="el-icon-delete"></i>删除
                                                </div>
                                                <div class="btnEdit"
                                                     @click="openFile(item.url,item.id,item.fileLastName)"><i
                                                    class="el-icon-link"></i>查看
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="edit" v-if="formEnclosureShow">
                                <el-form class="form cl" :model="formEnclosure" :rules="formEnclosureRules"
                                         ref="formEnclosure">
                                    <el-form-item label="文件名称" prop="name">
                                        <el-input v-model.trim="formEnclosure.name" placeholder="请填写文件名称"></el-input>
                                    </el-form-item>
                                    <el-upload ref="uploadFile" class="upload" :class="uploadFlag?'':'hide'" action="#"
                                               :on-change="handleFile" :on-remove='handleFileRemove' :limit="1"
                                               :auto-upload="false"
                                               accept="image/png,image/jpeg,application/pdf,.rar,application/zip"
                                               :file-list="formEnclosure.fileList">
                                        <i slot="default" class="el-icon-plus"></i>
                                        <div slot="tip" class="el-upload__tip">支持PNG、JPG、PDF、RAR、ZIP上传</div>
                                    </el-upload>
                                    <el-form-item style="margin-top: 30px;">
                                        <el-button type="primary" @click="submitForm('formEnclosure','add')">保存
                                        </el-button>
                                        <el-button @click="cancelEdit('formEnclosure')">取消</el-button>
                                    </el-form-item>
                                </el-form>
                            </div>
                        </div>
                        <!-- 其他情况（校内任职情况等） -->
                        <div class="section otherSituations">
                          <div class="title">其他需要说明的情况
                            <div class="btnEdit" @click="edit('otherSituations','edit','')"><i
                                class="el-icon-edit-outline"></i>编辑
                            </div>
                          </div>
                          <div class="primary" v-if="!otherSituationsShow">
                            <pre class="txt">{{ formAdvantage.otherSituations }}</pre>
                          </div>
                          <div class="edit" v-if="otherSituationsShow">
                            <el-form class="form cl" :model="formAdvantage" :rules="advantageRules"
                                     ref="otherSituations">
                              <el-form-item prop="otherSituations">
                                <el-input type="textarea" placeholder="请填写其他需要说明的情况"
                                          v-model="formAdvantage.otherSituations" maxlength="150"
                                          show-word-limit/>
                              </el-form-item>
                              <el-form-item>
                                <el-button type="primary" @click="submitForm('otherSituations','edit','')">
                                  保存并更新
                                </el-button>
                                <el-button @click="cancelEdit('otherSituations')">取消</el-button>
                              </el-form-item>
                            </el-form>
                          </div>
                        </div>
                    </div>
                </div>
                <div class="right fr">
                    <!-- 个人信息 -->
                    <PersonUserInfo ref="personUserInfo" @UploadResume="UploadResume" :random='random'
                                    @LookEnclosure="LookEnclosure"/>
                </div>
            </div>
        </div>
        <!-- 底部 -->
        <Footer/>
        <!-- 头像裁剪 -->
        <el-dialog class="uploadPop" title="上传头像" width="400px" :visible.sync="UploadPhotoFlag"
                   @close="UploadPhotoFlag = false" :close-on-click-modal='false'>
            <vueCropper
                ref="cropper"
                :img="cropperOption.img"
                :outputSize="cropperOption.size"
                :outputType="cropperOption.outputType"
                :info="true"
                :full="cropperOption.full"
                :canMove="cropperOption.canMove"
                :canMoveBox="cropperOption.canMoveBox"
                :original="cropperOption.original"
                :autoCrop="cropperOption.autoCrop"
                :autoCropWidth="cropperOption.autoCropWidth"
                :autoCropHeight="cropperOption.autoCropHeight"
                :fixed="cropperOption.fixed"
                :fixedNumber="cropperOption.fixedNumber"
                :centerBox="cropperOption.centerBox"
                :infoTrue="cropperOption.infoTrue"
                :fixedBox="cropperOption.fixedBox"
                :canScale="cropperOption.canScale"
                :enlarge="cropperOption.enlarge"
            ></vueCropper>
            <div class="btns">
                <el-button @click="UploadPhotoFlag = false">取消</el-button>
                <el-button type="primary" @click="cropperPhoto">确定</el-button>
            </div>
        </el-dialog>
        <!-- 查看附件图片 -->
        <el-dialog :visible.sync="dialogVisible" class="lookFile" :before-close="dialogClose">
            <div class="box">
                <img :src="dialogImageUrl" alt="" v-if="dialogImageUrl">
                <pdf :src="dialogPdfUrl" v-if="dialogPdfUrl" v-for="i in numPages" :key="i" :page="i"></pdf>
            </div>
        </el-dialog>
    </div>
</template>

<script>
import {
    baseData,
    baseSearch,
    certificateInfoAdd,
    certificateInfoDelete,
    certificateInfoEdit,
    cvFamilyMemberAdd,
    cvFamilyMemberDelete,
    cvFamilyMemberEdit,
    eduInfoAdd,
    eduInfoDelete,
    eduInfoEdit,
    getResume,
    getSign,
    languageInfoAdd,
    languageInfoDelete,
    languageInfoEdit,
    personInfo,
    personInfoEdit,
    projectInfoAdd,
    projectInfoDelete,
    projectInfoEdit,
    resumeCheck,
    resumeEdit,
    resumeFileDelete,
    skillInfoAdd,
    skillInfoDelete,
    skillInfoEdit,
    trainInfoAdd,
    trainInfoDelete,
    trainInfoEdit,
    updatePhoto,
    updateResumeInfo,
    uploadFile,
    workInfoAdd,
    workInfoDelete,
    workInfoEdit,
    workIntentionAdd,
    workIntentionDelete,
    workIntentionEdit,
    schoolDictQuery,
    majorDictQuery
} from '@/api/api'
import Header from '@/components/Header.vue'
import Footer from '@/components/Footer.vue'
import PersonUserInfo from '@/components/PersonUserInfo.vue'
import {VueCropper} from 'vue-cropper'
import pdf from 'vue-pdf'

export default {
    //组件注入
    components: {Header, Footer, PersonUserInfo, VueCropper, pdf},
    //存放数据
    data() {
        let checkNumberOfPerson = (rule, value, callback) => {
            if (value <= 0) {
                return callback(new Error(rule.message))
            }
            return callback()
        };

         var validateR1 = (rule, value,callback) => {
             if(this.formEducation.eduLevel == '0' || this.formEducation.eduLevel == '1'
                 || this.formEducation.eduLevel == '2' || this.formEducation.eduLevel == '3'){
                 if(value == "0"){
                     return callback();
                 }else{
                     return callback(new Error("请选择内容为无"))
                 }
             }else{
                //  if(value == "0"){
                //     return callback(new Error("请选择学位"))
                //  }
                 return callback();
             }

         };
         var validateMajor = (rule, value,callback) => {
             if(this.formEducation.eduLevel == '0' || this.formEducation.eduLevel == '1'
                 || this.formEducation.eduLevel == '2'){
                 if(value.length == 1 && value[0] == "无"){
                     return callback();
                 }else{
                     return callback(new Error("请选择内容为：无"))
                 }
             }else{
                 if(value.length == 0 || (value.length == 1 && value[0] == "无")){
                     return callback(new Error("请选择所学专业"))
                 }
                 return callback();
             }
             return callback();

         };

        return {
            checkResult: '',//简历情况
            random: 0,//随机值（更新用户信息用）
            editType: '',//add 添加
            editId: '',//编辑id
            editIdStorage: {},//修复 工作实习经历或教育经历 与其他项同时编辑时  报错  编辑失败
            resumeId: '',//简历id
            resumeType: 1,//1：社招，2：校招
            formUserInfoShow: false,//个人信息编辑
            formAdvantageShow: false,//个人优势编辑
            majorResearchDirectionShow: false,//主要研究方向编辑
            majorWorkPerformanceShow: false,//主要工作业绩
            selfEvaluationShow: false,//自我综合评价
            otherSituationsShow: false,//其他情况
            formWantJobShow: false,//期望职位编辑
            formWorkShow: false,//工作经历编辑
            formEducationShow: false,//教育经历编辑
            formProjectShow: false,//项目经历编辑
            formTrainShow: false,//培训经历编辑
            formLanguageShow: false,//语言能力编辑
            formSkillShow: false,//技能编辑
            formCertificateShow: false,//证书编辑
            formFamilyShow: false, //家庭成员
            formEnclosureShow: false,//附件上传
            UploadPhotoFlag: false,//上传头像
            fileName: '',
            isNow: false, // 离职日期至今
            cropperOption: {
                img: '', // 裁剪图片的地址
                info: true, // 裁剪框的大小信息
                outputSize: 0.8, // 裁剪生成图片的质量
                outputType: 'png', // 裁剪生成图片的格式
                canScale: true, // 图片是否允许滚轮缩放
                autoCrop: true, // 是否默认生成截图框
                autoCropWidth: 140, // 默认生成截图框宽度
                autoCropHeight: 182, // 默认生成截图框高度
                fixedBox: true, // 固定截图框大小 不允许改变
                fixed: true, // 是否开启截图框宽高固定比例
                fixedNumber: [1, 1.30], // 截图框的宽高比例
                full: false, // 是否输出原图比例的截图
                canMoveBox: true, // 截图框能否拖动
                original: false, // 上传图片按照原始比例渲染
                centerBox: false, // 截图框是否被限制在图片里面
                infoTrue: true, // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
                enlarge: 1,
            },
            photo: '',//头像
            familyList: [],
            formFamily: {
                id: '',
                appellation: '', // 称谓
                name: '', // 姓名
                age: null, // 年龄
                company: '', // 单位
                position: '', // 职位
                politics: '', // 政治面貌
                disabled : false,//28周岁以上，关联无法选择共青团员
                remark: '', // 备注
                birthday: '',//出生年月
                education: '',//文化程度
                phone: ''//联系短电话
            },
            formFamilyRules: {
                appellation: [
                    {required: true, message: '请填写称谓',},
                ],

                name: [
                    {required: true, message: '请填写亲属姓名',},
                ],
                birthday: [
                    {required: true, message: '请填写出生年月',},
                ],
                age: [
                    {required: true, message: '请填写年龄',},
                ],
                politics: [
                    {required: true, message: '请填写政治面貌',},
                ],
                education: [
                    {required: false, message: '请填写文化程度',},
                ],
                position: [
                    {required: true, message: '请填写职位',},
                ],
                company: [
                    {required: true, message: '请填写单位',},
                ],
                phone: [
                    {required: true, message: '请填写联系电话',},
                ],

            },
            formUserInfo: {
                tripartiteAgreement: '',//临时放置，为了验证
                name: '游客',//姓名
                sex: '',//性别
                birthday: '',//出生年月
                identity: '',//求职身份
                workState: '',//求职状态
                maritalStatus: '',//婚姻状况
                jobTime: '',//参加工作时间
                worked: false,
                homeTownCode: '',//户口所在地
                liveCityCode: '',//现居住城市
                political: '',//政治面貌
                disabled : false,//28周岁以上，关联无法选择共青团员
                phone: '',//联系方式
                email: '',//电子邮箱
                age: '0',//年龄
                workYear: '0',//工作时间
                jobTimeFlag: true,//暂无工作经验
                photoId: '',//头像文件id
                r1: '1', // 同意调剂 标识 1 同意  2 不同意
                r2: '', // 民族
                r3: '', // 身高
                r4: '', // 体重
                r5: '', // 驾驶证
                r6: '', // 身份证号
                r7: '', // 紧急联系人
                r8: '', // 紧急联系方式
                partyTime: '',//入党时间
                foreignLanguage: '无',//外语水平
                computerSkill: '无',//计算机水平
                address: '',
            },
            userinfoRules: {
                name: [
                    {required: true, message: '请填写真实姓名',},
                ],
                r1: [
                    {required: true, message: '请选择是否同意调剂',},
                ],
                r6: [
                    {
                        required: true,
                        pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
                        message: '请填写正确的身份证号',
                        trigger: 'blur'
                    }
                ],
                r3: [
                    {
                        required: true,
                        pattern: /^(0{1}|[1-9]\d{0,3}|.{0})$/,
                        message: '请填写正确的身高值',
                        trigger: 'blur'
                    }
                ],
                r4: [
                    {
                        required: true,
                        pattern: /^(0(\.\d{1}){0,1}|[1-8]\d{1,3}(\.\d{1}){0,1}|9\d{1,2}(\.\d{1}){0,1}|999(\.0){0,1}|.{0})$/,
                        message: '请填写正确的体重值',
                        trigger: 'blur'
                    }
                ],
                //2022年3月11日13:40:41 zhf新增

                r5: [
                    {required: true, message: '请选择驾驶证',}
                ],
                r2: [
                    {required: true, message: '请选择驾民族',}
                ],
                political: [
                    {required: true, message: '请选择政治面貌',}
                ],
                partyTime: [
                    {required: true, message: '请选择加入时间',}
                ],
                address: [
                    {required: true, message: '请输入详细地址',}
                ],
                r7: [
                    {required: true, message: '请输入紧急联系人',}
                ],
                tripartiteAgreement: [
                    {required: true, message: '请输入与其他单位签订三方协议情况',}
                ],
                foreignLanguage: [
                    {required: true, message: '请选择外语水平',}
                ],
                computerSkill: [
                    {required: true, message: '请选择计算机水平',}
                ],


                r8: [
                    {
                        required: true,
                        pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
                        message: '请填写正确的手机号',
                        trigger: 'blur'
                    }
                ],
                sex: [
                    {required: true, message: '请选择您的性别',},
                ],
                birthday: [
                    {required: true, message: '请选择出生年月',}
                ],
                identity: [
                    {required: true, message: '请选择求职身份',}
                ],
                maritalStatus: [
                    {required: true, message: '请选择婚姻状况',}
                ],
                jobTime: [
                    {required: true, message: '请选择参加工作时间',}
                ],
                homeTownCode: [
                    {required: true, message: '请选择户口所在地',}
                ],
                liveCityCode: [
                    {required: true, message: '请选择现居住城市',}
                ],
                phone: [
                    {required: true, message: '请填写联系方式',},
                ],
                email: [
                    {required: true, message: '请填写电子邮箱',},
                    {type: 'email', message: '请输入正确的电子邮箱', trigger: ['blur', 'change']}
                ],
                workState: [
                    {required: true, message: '请选择求职状态',}
                ],
                jobTimeFlag: [
                    {required: true, message: '请选择参加工作经历',}
                ],
            },
            formAdvantage: {
                advantage: '',//个人优势

                majorResearchDirection: '',//主要研究方向及成果(校招)
                majorWorkPerformance: '',//主要工作业(社招)
                selfEvaluation: '',//自我综合评价(校招)
                otherSituations: '',//其他情况（校内任职情况等）(校招)
                tripartiteAgreement: '',
            },
            advantageRules: {//个人优势验证
                advantage: [
                    {required: true, message: '请填写个人优势',},
                ],
                majorResearchDirection: [
                    {required: true, message: '请填写主要研究方向及成果',},
                ],
                majorWorkPerformance: [
                    {required: true, message: '请填写主要工作业绩',},
                ],
                selfEvaluation: [
                    {required: true, message: '请填写自我综合评价',},
                ],
                otherSituations: [
                    {required: false, message: '请填写其他情况（校内任职情况等）',},
                ],
            },
            formWantJob: {
                id: '',
                workNatureCode: [],//期望职位
                cityStringCode: [],//期望地点
                workType: '',//求职类型
                workIndustryCode: [],//期望行业
                money: '',//薪资要求范围
            },
            wantJobRules: {//期望职位验证
                workNatureCode: [
                    {required: true, message: '请选择期望职位',},
                ],
                cityStringCode: [
                    {required: true, message: '请选择期望地点',},
                ],
                workType: [
                    {required: true, message: '请选择求职类型',},
                ],
                workIndustryCode: [
                    {required: true, message: '请选择期望行业',},
                ],
                money: [
                    {required: true, message: '请选择薪资要求范围'},
                ],
            },
            wantJobList: [],//期望职位列表
            formWork: {
                id: '',
                companyName: '',//公司名称
                positionNameCode: [],//所任职位
                otherPosition:'',
                workSignCode: [],//该份工作需要的技能
                workStartTime: '',
                workEndTime: '',
                salary: '',//税前月薪
                workContent: '',//工作内容
                r1: '', // 单位类型
                r2: '', // 所属部门
                r3: '', // 直接上级
                r4: '', // 上级职位
                r5: '', // 下属人数
                r6: '', // 离职原因
            },
            formWorkRules: {//工作经历验证
                companyName: [
                    {required: true, message: '请填写公司名称',},
                ],
                r2: [
                    {required: true, message: '请填写所属部门',},
                ],
                r1: [
                    {required: true, message: '请选择单位类型',},
                ],
                positionNameCode: [
                    {required: true, message: '请选择所任职位',},
                ],
                workSignCode: [
                    {required: true, message: '请选择该份工作需要的技能',},
                ],
                workStartTime: [
                    {required: true, message: '请选择入职时间',},
                ],
                workEndTime: [
                    {required: true, message: '请选择离职时间',},
                ],
                salary: [
                    {required: true, message: '请选择税前月薪',},
                    {validator: this.$numberText, trigger: 'blur'},
                ],
                workContent: [
                    {required: true, message: '请填写工作内容',},
                ],
                r3: [
                    {required: true, message: '请选择单位规模',},
                ],
                r5: [
                    {required: true, message: '请填写下属人数',},
                    // {validator: checkNumberOfPerson, trigger: 'blur', message: '下属人数必须大于0'},
                ],
                r4: [
                    {required: true, message: '请填写上级职位',},
                ],
                r6: [
                    {required: true, message: '请填写离职原因',},
                ],


            },
            workList: [],//工作经历列表
            formEducation: {
                id: '',
                schoolName: '',//学校名称
                major: '',//所学专业
                overseasFlag: '',//海外学习经历
                //studyTime: '',//就读时间
                startEduTime: '',
                endEduTime: '',
                recruitmentFlag: '',//是否统招
                eduLevel: '',//学历
                r1: '', // 学位 1 学士 2 硕士 3 博士
                r2: '1',  // 是否全日制 1 是 2 不是
            },
            formEducationRules: {//教育经历验证
                schoolName: [
                    {required: true, message: '请填写学校名称',},
                ],
                major: [
                    {required: true,validator: validateMajor, trigger: 'blur'},
                ],
                /*studyTime: [
                    {required: true, message: '请选择就读时间',},
                ],*/
                startEduTime: [
                  {required: true, message: '请选择入学时间',},
                ],
                endEduTime: [
                  {required: true, message: '请选择毕业时间',},
                ],
                recruitmentFlag: [
                    {required: true, message: '请选择是否统招',},
                ],
                eduLevel: [
                    {required: true, trigger: 'blur'},
                ],
                overseasFlag: [
                    {required: true, message: '请选择海外留学经历',},
                ],
                r1: [
                    {required: true, validator: validateR1,message: '请选择学位'},
                ],
                r2: [
                    {required: true, message: '是否是全日制',},
                ],
            },
            educationList: [],//教育经历列表
            formProject: {
                id: '',
                projectName: '',//项目名称
                r1: '',//项目职务
                r2: '',//项目所在公司
                r3: '',//项目职责
                r4: '',//项目业绩
                startTime: '',
                endTime: '',
                projectDescribe: '',//项目描述
            },
            formProjectRules: {//项目经历验证
                projectName: [
                    {required: true, message: '请填写项目名称',},
                ],
                r1: [
                    {required: true, message: '请填写项目职务',},
                ],
                r2: [
                  {required: true, message: '请填写项目所在公司',},
                ],
                startTime: [
                  {required: true, message: '请选择项目开始时间',},
                ],
                endTime: [
                  {required: true, message: '请选择项目结束时间',},
                ],
                recruitmentFlag: [
                  {required: true, message: '请选择是否统招',},
                ],
                projectDescribe: [
                    {required: true, message: '请填写项目描述',},
                ],
            },
            projectList: [],//项目经历列表
            formTrain: {
                id: '',
                //time: '',//培训时间
                startTime: '',
                endTime: '',
                mechanismName: '',//培训机构
                curriculum: '',//培训课程
            },
            formTrainRules: {//培训经历验证
                /*time: [
                    {required: true, message: '请选择培训时间',},
                ],*/
                startTime: [
                  {required: true, message: '请选择培训开始时间',},
                ],
                endTime: [
                  {required: true, message: '请选择培训结束时间',},
                ],
                mechanismName: [
                    {required: true, message: '请填写培训机构',},
                ],
                curriculum: [
                    {required: true, message: '请填写培训课程',},
                ],
            },
            trainList: [],//培训经历列表
            formLanguage: {
                id: '',
                type: '',//语种
                oralLanguageLevel: '',//听说能力
                readingLevel: '',//读写能力
            },
            formLanguageRules: {//语言能力验证
                type: [
                    {required: true, message: '请选择语种',},
                ],
                oralLanguageLevel: [
                    {required: true, message: '请选择听说能力',},
                ],
                readingLevel: [
                    {required: true, message: '请选择读写能力',},
                ],
            },
            languageList: [],//语言能力列表
            formSkill: {
                id: '',
                name: '',//技能名称
                time: '',//使用时长
                level: '',//掌握程度
            },
            formSkillRules: {//职业特长与技能验证
                name: [
                    {required: true, message: '请填写职称名称',},
                ],
                time: [
                    {required: true, message: '请填写获得时间',},
                ],
                level: [
                    {required: true, message: '请填写获得单位',},
                ],
            },
            skillList: [],//特长技能
            formCertificate: {
                id: '',
                name: '',//证书名称
                time: '',//获得时间
                licenseIssuingUnit: '',
            },
            formCertificateRules: {//证书验证
                name: [
                    {required: true, message: '请填写证书名称',},
                ],
                time: [
                    {required: true, message: '请选择获得时间',},
                ],
                licenseIssuingUnit: [
                    {required: true, message: '请填写发证机关',},
                ],
            },
            certificateList: [],//证书列表
            formEnclosure: {//附件
                name: '',//证书名称
                file: {},//文件
                fileList: []
            },
            uploadFlag: true,
            formEnclosureRules: {//附件验证
                name: [
                    {required: true, message: '请填写附件名称',},
                ],
                file: [
                    {required: true, message: '请上传附件',},
                ],
            },
            fileList: [],//附件列表
            moneyOptions: [
                {
                    value: '0-1000',
                    label: '1000元/月以下'
                },
                {
                    value: '1000-2000',
                    label: '1000-2000元/月'
                },
                {
                    value: '2000-4000',
                    label: '2000-4000元/月'
                },
                {
                    value: '4000-6000',
                    label: '4000-6000元/月'
                },
                {
                    value: '6000-8000',
                    label: '6000-8000元/月'
                },
                {
                    value: '8000-10000',
                    label: '8000-10000元/月'
                },
                {
                    value: '10000-15000',
                    label: '10000-15000元/月'
                },
                {
                    value: '15000-25000',
                    label: '15000-25000元/月'
                },
                {
                    value: '25000-35000',
                    label: '25000-35000元/月'
                },
                {
                    value: '35000-50000',
                    label: '35000-50000元/月'
                },
                {
                    value: '50000-70000',
                    label: '50000-70000元/月'
                },
                {
                    value: '70000-100000',
                    label: '70000-100000元/月'
                },
                {
                    value: '100000-999999',
                    label: '100000元/月以上'
                }
            ],
            pickerOptions: {
                // disabledDate(time) {
                //     return time.getTime() > Date.now();
                // },
            },
            pickerOptionsDisabledAfterNow: {
                disabledDate(time) {
                    return time.getTime() > Date.now();
                },
            },
            jobPosition: [],//职位
            schoolList: [],//学校
            majorList: [],//专业
            areaList: [],//省市区
            searchList: [],//联想搜索列表
            industryList: [],//行业列表
            skills: [],//技能列表
            dialogVisible: false,//附件图片弹出
            dialogImageUrl: '',//附件图片
            dialogPdfUrl: '',//pdf
            numPages: undefined,//pdf
            otherPositionReadOnly: true
        }
    },
    //接受父组件传递的值
    props: [],
    //监控data中的数据变化
    watch: {
         //28岁共青团员置灰 个人
        'formUserInfo.birthday':function (newName,oldName){
               let nowTime = new Date().getTime();
               let age =  Math.ceil((nowTime-newName)/31536000000);

               if(age > 28){
                    this.formUserInfo.disabled = true;
               }else{
                    this.formUserInfo.disabled = false;
               }
         },
         //28岁共青团员置灰 家庭
         'formFamily.birthday':function (newName,oldName){
                let nowTime = new Date().getTime();
                let age =  Math.ceil((nowTime-newName)/31536000000);
                if(age > 28){
                    this.formFamily.disabled = true;
                }else{
                    this.formFamily.disabled = false;
                }
         },
         //学历
         'formEducation.eduLevel':function (newName,oldName){
            // 大专3,  中专/中技2,  高中1  , 初中0
            if(newName == "0" || newName == "1" || newName == "2"){
                this.formEducation.major = ["无"];
                this.formEducation.r1 = "0";
            }

            if(newName == "3"){
                this.formEducation.r1 = "0";
            }
         }
    },
    //方法集合
    methods: {
        //根据关键词搜索学校/职位
        getSearch(val, type) {
            baseSearch({
                'title.keywords': val,
                'type': type,
            }).then(res => {
                if (res.code == 200) {
                    this.searchList = res.result
                }
            });
        },
        //选择职位查询技能
        chooseJobPosition(e) {
            let nodesObj = this.$refs['jobPosition'].getCheckedNodes()
            let val = nodesObj[0].value
            if(val == '1324530808767864837'){
              this.otherPositionReadOnly=false;
            }
            else{
              this.otherPositionReadOnly=true;
              this.formWork.otherPosition='';
            }
            //查询技能
            baseData({
                'code': val,
                'clz': 'skills'
            }).then(res => {
                if (res.code == 200) {
                    this.skills = res.result
                }
            });
        },
        //联想
        querySearch(queryString, cb) {
            var searchList = this.searchList;
            var results = queryString ? searchList.filter(this.createFilter(queryString)) : searchList;
            // 调用 callback 返回建议列表的数据
            cb(results);
        },
        createFilter(queryString) {
            return (searchList) => {
                return (searchList.title.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
            };
        },
        //选择联想学校
        handleSelect(item) {
            this.formEducation.schoolName = item.title
        },
        //选择联想专业
        handleSelect1(item) {
            this.formEducation.major = item.title
        },
        //上传简历
        UploadResume(e) {
            this.$refs.Header.UploadResumeFlag = e.UploadResumeFlag
        },
        toggleNow(val) {
          this.isNow = val
          if(this.isNow) {
            this.formWork.workEndTime = '至今'
          }else {
            this.formWork.workEndTime = ''
          }
        },
        //编辑简历
        edit(formName, type, id) {
            this[formName + 'Show'] = true
            this.editType = type
            this.editId = id
            this.editIdStorage[formName] = id
            console.log('editformName=' + formName + '   ==>   ' + 'editType=' + this.editType + '   ==>   ' + 'editId=' + this.editId)
            //家庭成员及重要社会关系
            if (formName == 'formFamily') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formFamily = this.$options.data().formFamily;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.familyList) {
                            if (id == this.familyList[i].id) {
                                this.formFamily = this.familyList[i];
                                let nowTime = new Date().getTime();
                                let age =  Math.ceil((nowTime- this.formFamily.birthday)/31536000000);
                                //28岁共青团员置灰 家庭
                                if(age > 28){
                                    this.formFamily.disabled = true;
                                }else{
                                    this.formFamily.disabled = false;
                                }
                            }
                        }
                    }
                })
            }

            //期望职位编辑
            if (formName == 'formWantJob') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formWantJob = this.$options.data().formWantJob;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.wantJobList) {
                            if (id == this.wantJobList[i].id) {
                                this.formWantJob = this.wantJobList[i]
                            }
                        }
                    }
                })
            }
            //工作经历编辑
            if (formName == 'formWork') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formWork = this.$options.data().formWork;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.workList) {
                            if (id == this.workList[i].id) {
                              this.formWork = this.workList[i]
                              this.isNow = this.formWork.workEndTime === '至今'
                            }
                        }
                      if (this.formWork.positionNameCode.length == 3 && this.formWork.positionNameCode[2] == '1324530808767864837') {
                        this.otherPositionReadOnly = false;
                      }
                      else{
                        this.otherPositionReadOnly=true;
                        this.formWork.otherPosition='';
                      }
                    }
                })
            }
            //教育经历编辑
            if (formName == 'formEducation') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formEducation = this.$options.data().formEducation;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.educationList) {
                            if (id == this.educationList[i].id) {
                                this.educationList[i].major = this.educationList[i].major.split("/");
                                this.formEducation = this.educationList[i]
                            }
                        }
                    }
                })
            }
            //项目经历编辑
            if (formName == 'formProject') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formProject = this.$options.data().formProject;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.projectList) {
                            if (id == this.projectList[i].id) {
                                this.formProject = this.projectList[i]
                            }
                        }
                    }
                })
            }
            //培训经历编辑
            if (formName == 'formTrain') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formTrain = this.$options.data().formTrain;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.trainList) {
                            if (id == this.trainList[i].id) {
                                this.formTrain = this.trainList[i]
                            }
                        }
                    }
                })
            }
            //语言能力编辑
            if (formName == 'formLanguage') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formLanguage = this.$options.data().formLanguage;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.languageList) {
                            if (id == this.languageList[i].id) {
                                this.formLanguage = this.languageList[i]
                            }
                        }
                    }
                })
            }
            //特长技能编辑
            if (formName == 'formSkill') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formSkill = this.$options.data().formSkill;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.skillList) {
                            if (id == this.skillList[i].id) {
                                this.formSkill = this.skillList[i]
                            }
                        }
                    }
                })
            }
            //资质证书编辑
            if (formName == 'formCertificate') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formCertificate = this.$options.data().formCertificate;
                        this.$refs[formName].resetFields();
                    } else if (type == 'edit') {
                        for (let i in this.certificateList) {
                            if (id == this.certificateList[i].id) {
                                this.formCertificate = this.certificateList[i]
                            }
                        }
                    }
                })
            }
            //附件
            if (formName == 'formEnclosure') {
                this.$nextTick(() => {
                    if (type == 'add') {
                        this.formEnclosure = this.$options.data().formEnclosure;
                        this.$refs[formName].resetFields();
                        this.uploadFlag = true
                    }
                })
            }
        },
        //取消编辑简历
        cancelEdit(formName) {
            this[formName + 'Show'] = false
            this.getResume()
        },
        //学校支持手动输入
        onSchoolNameBlur(e) {
              if (e.target.value) {
                this.formEducation.schoolName = e.target.value;
              }
        },
        //专业支持手动输入
        onMajorNameBlur(e) {
              if (e.target.value) {
                this.formEducation.major = e.target.value;
              }
        },
        //删除
        delect(formName, id) {
            console.log(formName)
            this.$confirm('删除后不可恢复，确认删除吗？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                //家庭成员删除
                if (formName == 'formFamily') {
                    cvFamilyMemberDelete({
                        'id': id,
                    }).then(res => {
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //期望职位删除
                if (formName == 'formWantJob') {
                    workIntentionDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //工作经历删除
                if (formName == 'formWork') {
                    workInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //教育经历删除
                if (formName == 'formEducation') {
                    eduInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //项目经历删除
                if (formName == 'formProject') {
                    projectInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //培训经历删除
                if (formName == 'formTrain') {
                    trainInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //语言能力删除
                if (formName == 'formLanguage') {
                    languageInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //特长技能删除
                if (formName == 'formSkill') {
                    skillInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //特长技能删除
                if (formName == 'formCertificate') {
                    certificateInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //特长技能删除
                if (formName == 'formCertificate') {
                    certificateInfoDelete({
                        'id': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
                //附件删除
                if (formName == 'formEnclosure') {
                    resumeFileDelete({
                        'id': this.resumeId,
                        'enclosureId': id,
                    }).then(res => {
                        console.log(res);
                        if (res.code == 200) {
                            this.$message.success('删除成功');
                            this.getResume()
                            this.updateResumeInfo()
                        } else {
                            this.$message.error(res.message);
                        }
                    });
                }
            })
        },
        //上传头像
        handleAvatar(file) {
            let isLt5M = file.size / 1024 / 1024 < 5
            let type = file.name.substring(file.name.lastIndexOf(".") + 1)
            if (!isLt5M) {
                this.$message.error('上传文件大小不能超过 5MB!')
                return false
            }
            if (!(type == 'png' || type == 'jpg' || type == 'jpeg')) {
                this.$message.error('请上传PNG、JPG格式的文件')
                return false
            }
            this.fileName = file.name
            file.url = URL.createObjectURL(file.raw)
            // 上传成功后将图片地址赋值给裁剪框显示图片
            this.$nextTick(() => {
                this.cropperOption.img = file.url
                this.UploadPhotoFlag = true
            })
        },
        //头像裁剪完回调
        cropperPhoto() {
            this.$refs.cropper.getCropBlob((data) => {
                console.log(data)
                let date = new Date().getFullYear() + '/' + (new Date().getMonth() + 1)
                let formData = new FormData();
                formData.append('file', data, this.fileName);
                formData.append('biz', 'public/user/' + date);
                uploadFile(formData).then(res => {
                    if (res.code == 200) {
                        updatePhoto({id: this.id, photoId: res.result.fileId}).then(response => {
                            if (response.success) {
                                this.photo = res.result.url
                                this.formUserInfo.photoId = res.result.fileId
                                this.UploadPhotoFlag = false
                                this.updataUserInfo()//更新用户信息
                                this.updateResumeInfo()//根据简历id更新在线简历详情
                                this.$refs.personUserInfo.reloadUserInfo()//刷新右侧头像
                            } else {
                                this.$message.error(res.message);
                            }
                        })
                        // this.submitForm('formUserInfo')
                    } else {
                        this.$message.error(res.message);
                    }
                    console.log(this.formUserInfo)
                });
            })
        },
        //上传附件
        handleFile(file, fileList) {
            let isLt5M = file.size / 1024 / 1024 < 20
            let type = file.name.substring(file.name.lastIndexOf(".") + 1)
            if (!isLt5M) {
                this.$message.error('上传文件大小不能超过 20MB!')
                this.$refs.uploadFile.clearFiles()
                return false
            }
            if (!(type == 'png' || type == 'jpg' || type == 'jpeg' || type == 'pdf'|| type == 'rar'|| type == 'zip')) {
                this.$message.error('请上传PNG、JPG、PDF、RAR、ZIP格式的文件')
                this.$refs.uploadFile.clearFiles()
                return false
            }
            if (fileList.length > 0) {
                this.uploadFlag = false
            }
            this.formEnclosure.file = file.raw
        },
        //移除上传附件回调
        handleFileRemove() {
            this.formEnclosure.file = {}
            this.uploadFlag = true
        },

        restWorkStateAndIdentity(resumeType) {//根据传递的workSate 设置默认求助状态
            if (2 == resumeType) {
                //校招简历
                console.log("求职身份", this.formUserInfo.identity);
                //校招简历
                // if('2'!=this.formUserInfo.identity){//求职身份  1-职场人 2- 应届生
                // }
                console.log("当前为校招简历：");
                this.formUserInfo.identity = '2';//强制设置求助身份 求职身份  1-职场人 2- 应届生
                console.log("重置 求职身份", this.formUserInfo.identity);

                if (4 != this.formUserInfo.workState && '5' != this.formUserInfo.workState) {
                    this.formUserInfo.workState = '';
                }

                console.log("workState1.1  ==>", this.formUserInfo.workState);


            } else {
                //社招简历
                this.formUserInfo.identity = '1';//强制设置求助身份 求职身份  1-职场人 2- 应届生
                let workState = parseInt(this.formUserInfo.workState);
                if (workState > 3) {
                    this.formUserInfo.workState = '';
                }

                console.log("重置 求职身份", this.formUserInfo.identity);
                console.log("workState1.2  ==>", this.formUserInfo.workState);
            }
        },
        switchChange(val) {
            //求职身份 identity  1-职场人 2- 应届生
            //resumeType  1 社招简历 2-校招简历
            this.$refs['formUserInfo'].clearValidate()

            this.restWorkStateAndIdentity(val);
            resumeEdit({
                'id': this.resumeId,
                'userId': this.userId,
                'type': 0,
                'resumeType': val
            }).then(res => {
                console.log(res);
                if (res.code == 200) {
                    this.updateResumeInfo()//根据简历id更新在线简历详情
                    this.$refs.personUserInfo.getResumeList()
                } else {
                    this.$message.error(res.message);
                }
            });
        },
        //提交表单
        submitForm(formName, type) {
            console.log(formName)
            this.$refs[formName].validate((valid) => {
                if (valid) {
                    //个人资料
                    if (formName == 'formUserInfo') {
                        if (this.formUserInfo.jobTimeFlag) {
                            this.formUserInfo.jobTimeFlag = 0
                        } else {
                            this.formUserInfo.jobTimeFlag = 1
                        }
                        resumeEdit({
                            'id': this.resumeId,
                            'userId': this.userId,
                            'type': 0,
                            // 'tripartiteAgreement': this.formAdvantage.tripartiteAgreement
                            'tripartiteAgreement': this.formUserInfo.tripartiteAgreement
                        }).then(res => {
                            if (res.code != 200) {
                                this.$message.error(res.message);
                            }
                        });
                        //编辑个人信息接口
                        personInfoEdit({
                            'id': this.id,
                            'userId': this.userId,
                            'username': this.userName,
                            'name': this.formUserInfo.name,//姓名
                            'sex': this.formUserInfo.sex,//性别
                            'homeTownCode': this.formUserInfo.homeTownCode,//户口所在地
                            'identity': this.formUserInfo.identity,//求职身份
                            'email': this.formUserInfo.email,//邮箱
                            'birthday': this.formUserInfo.birthday,//出生年月
                            'liveCityCode': this.formUserInfo.liveCityCode,//所在城市
                            'jobTime': this.formUserInfo.jobTime,//工作时间
                            'workState': this.formUserInfo.workState,//工作状态
                            'political': this.formUserInfo.political,//政治面貌
                            'phone': this.formUserInfo.phone,//手机号
                            'maritalStatus': this.formUserInfo.maritalStatus,//婚姻
                            'photoId': this.formUserInfo.photoId,//头像id
                            'jobFlag': this.formUserInfo.jobTimeFlag,
                            partyTime: this.formUserInfo.partyTime,
                            foreignLanguage: this.formUserInfo.foreignLanguage,
                            computerSkill: this.formUserInfo.computerSkill,
                            address: this.formUserInfo.address,
                            r1: this.formUserInfo.r1,
                            r2: this.formUserInfo.r2,
                            r3: this.formUserInfo.r3,
                            r4: this.formUserInfo.r4,
                            r5: this.formUserInfo.r5,
                            r6: this.formUserInfo.r6,
                            r7: this.formUserInfo.r7,
                            r8: this.formUserInfo.r8,
                        }).then(res => {
                            console.log(res);
                            if (res.code == 200) {
                                this.$message.success('保存成功');
                                this.UploadPhotoFlag = false
                                this.cancelEdit('formUserInfo')
                                this.updataUserInfo()//更新用户信息
                                this.updateResumeInfo()//根据简历id更新在线简历详情
                            } else {
                                this.$message.error(res.message);
                            }
                        });
                    }
                    //个人优势
                    if (formName == 'formAdvantage') {
                        //编辑个人优势接口
                        resumeEdit({
                            'id': this.resumeId,
                            'userId': this.userId,
                            'type': 0,
                            'advantage': this.formAdvantage.advantage
                        }).then(res => {
                            console.log(res);
                            if (res.code == 200) {
                                this.$message.success('保存成功');
                                this.cancelEdit('formAdvantage')
                                this.updateResumeInfo()//根据简历id更新在线简历详情
                            } else {
                                this.$message.error(res.message);
                            }
                        });
                    }

                    //主要工作业绩
                    if (formName == 'majorWorkPerformance') {
                        resumeEdit({
                            'id': this.resumeId,
                            'userId': this.userId,
                            'type': 0,
                            'majorWorkPerformance': this.formAdvantage.majorWorkPerformance
                        }).then(res => {
                            console.log(res);
                            if (res.code == 200) {
                                this.$message.success('保存成功');
                                this.cancelEdit('majorWorkPerformance')
                                this.updateResumeInfo()//根据简历id更新在线简历详情
                            } else {
                                this.$message.error(res.message);
                            }
                        });
                    }

                    //主要研究方向及成果
                    if (formName == 'majorResearchDirection') {
                        resumeEdit({
                            'id': this.resumeId,
                            'userId': this.userId,
                            'type': 0,
                            'majorResearchDirection': this.formAdvantage.majorResearchDirection
                        }).then(res => {
                            console.log(res);
                            if (res.code == 200) {
                                this.$message.success('保存成功');
                                this.cancelEdit('majorResearchDirection')
                                this.updateResumeInfo()//根据简历id更新在线简历详情
                            } else {
                                this.$message.error(res.message);
                            }
                        });
                    }

                    //自我综合评价
                    if (formName == 'selfEvaluation') {
                        resumeEdit({
                            'id': this.resumeId,
                            'userId': this.userId,
                            'type': 0,
                            'selfEvaluation': this.formAdvantage.selfEvaluation
                        }).then(res => {
                            console.log(res);
                            if (res.code == 200) {
                                this.$message.success('保存成功');
                                this.cancelEdit('selfEvaluation')
                                this.updateResumeInfo()//根据简历id更新在线简历详情
                            } else {
                                this.$message.error(res.message);
                            }
                        });
                    }

                    //其他情况（校内任职情况等）
                    if (formName == 'otherSituations') {
                        resumeEdit({
                            'id': this.resumeId,
                            'userId': this.userId,
                            'type': 0,
                            'otherSituations': this.formAdvantage.otherSituations
                        }).then(res => {
                            console.log(res);
                            if (res.code == 200) {
                                this.$message.success('保存成功');
                                this.cancelEdit('otherSituations')
                                this.updateResumeInfo()//根据简历id更新在线简历详情
                            } else {
                                this.$message.error(res.message);
                            }
                        });
                    }

                    //家庭成员及重要社会关系
                    if (formName == 'formFamily') {
                        let form = JSON.parse(JSON.stringify(this.formFamily))
                        form.resumeId = this.resumeId
                        if (type == 'add') {
                            //新增
                            cvFamilyMemberAdd(form).then(res => {
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formFamily')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑
                            cvFamilyMemberEdit(form).then(res => {
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formFamily')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }

                    //期望职位
                    if (formName == 'formWantJob') {
                        if (type == 'add') {
                            //新增期望职位接口
                            workIntentionAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'workType': parseInt(this.formWantJob.workType),//求职类型
                                'workNatureCode': this.formWantJob.workNatureCode,//期望职位
                                'minMoney': parseInt(this.formWantJob.money.split('-')[0]),//薪资下限
                                'maxMoney': parseInt(this.formWantJob.money.split('-')[1]),//薪资上限
                                'workIndustryCode': this.formWantJob.workIndustryCode,//期望行业
                                'cityStringCode': this.formWantJob.cityStringCode,//期望地点
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formWantJob')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑期望职位接口
                            workIntentionEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'workType': parseInt(this.formWantJob.workType),//求职类型
                                'workNatureCode': this.formWantJob.workNatureCode,//期望职位
                                'minMoney': parseInt(this.formWantJob.money.split('-')[0]),//薪资下限
                                'maxMoney': parseInt(this.formWantJob.money.split('-')[1]),//薪资上限
                                'workIndustryCode': this.formWantJob.workIndustryCode,//期望行业
                                'cityStringCode': this.formWantJob.cityStringCode,//期望地点
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formWantJob')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //工作经历
                    if (formName == 'formWork') {
                      if (this.formWork.positionNameCode.length == 3 && this.formWork.positionNameCode[2] == '1324530808767864837') {
                        if(this.formWork.otherPosition==''){
                          this.$message.error("请填写其他职位说明")
                          return;
                        }
                      }
                        if (type == 'add') {
                            //新增工作经历接口
                            workInfoAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'companyName': this.formWork.companyName,//公司名称
                                'positionNameCode': this.formWork.positionNameCode,//职位
                                'otherPosition': this.formWork.otherPosition,
                                'workStartTime': this.formWork.workStartTime,//入职时间
                                'workEndTime': this.isNow ? '至今' : this.formWork.workEndTime,//离职时间
                                'workContent': this.formWork.workContent,//工作内容
                                'salary': this.formWork.salary,//税前月薪
                                // r1: this.formWork.r1.length > 0 ? this.formWork.r1.join(",") : "",
                                r1: this.formWork.r1,
                                r2: this.formWork.r2,
                                r3: this.formWork.r3,
                                r4: this.formWork.r4,
                                r5: this.formWork.r5,
                                r6: this.formWork.r6,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formWork')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑工作经历接口
                            workInfoEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'companyName': this.formWork.companyName,//公司名称
                                'positionNameCode': this.formWork.positionNameCode,//职位
                                'otherPosition': this.formWork.otherPosition,
                                'workStartTime': this.formWork.workStartTime,//入职时间
                                'workEndTime': this.isNow ? '至今' : this.formWork.workEndTime,//离职时间
                                'workContent': this.formWork.workContent,//工作内容
                                'workSignCode': this.formWork.workSignCode,//工作技能
                                'salary': this.formWork.salary,//税前月薪
                                // r1: this.formWork.r1.length > 0 ? this.formWork.r1.join(",") : "",
                                r1: this.formWork.r1,
                                r2: this.formWork.r2,
                                r3: this.formWork.r3,
                                r4: this.formWork.r4,
                                r5: this.formWork.r5,
                                r6: this.formWork.r6,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formWork')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //教育经历
                    if (formName == 'formEducation') {
                        let majorList = this.formEducation.major.join("/");
                        if (type == 'add') {
                            //新增教育经历接口
                            eduInfoAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'schoolName': this.formEducation.schoolName,//学校
                                'eduLevel': this.formEducation.eduLevel,//最高学历
                                'recruitmentFlag': this.formEducation.recruitmentFlag,//是否统招
                                'major': majorList,//专业
                                'startEduTime': this.formEducation.startEduTime,//就读时间
                                'endEduTime': this.formEducation.endEduTime,//毕业时间
                                'r1': this.formEducation.r1,
                                'r2': this.formEducation.r2,
                                //'overseasFlag':JSON.parse(this.formEducation.overseasFlag),//留学
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formEducation')
                                    this.updataUserInfo()//更新用户信息
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑教育经历接口
                            eduInfoEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'schoolName': this.formEducation.schoolName,//学校
                                'eduLevel': this.formEducation.eduLevel,//最高学历
                                'recruitmentFlag': this.formEducation.recruitmentFlag,//是否统招
                                'major': majorList,//专业
                                'startEduTime': this.formEducation.startEduTime,//就读时间
                                'endEduTime': this.formEducation.endEduTime,//毕业时间
                                'r1': this.formEducation.r1,
                                'r2': this.formEducation.r2,
                                //'overseasFlag':JSON.parse(this.formEducation.overseasFlag),//留学
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formEducation')
                                    this.updataUserInfo()//更新用户信息
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //项目经历
                    if (formName == 'formProject') {
                        if (type == 'add') {
                            //新增项目经历接口
                            projectInfoAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'projectName': this.formProject.projectName,
                                'r1': this.formProject.r1,
                                'r2': this.formProject.r2,
                                'r3': this.formProject.r3,
                                'r4': this.formProject.r4,
                                'startTime': this.formProject.startTime,
                                'endTime': this.formProject.endTime,
                                'projectDescribe': this.formProject.projectDescribe,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formProject')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑项目经历接口
                            projectInfoEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'projectName': this.formProject.projectName,
                                'r1': this.formProject.r1,
                                'r2': this.formProject.r2,
                                'r3': this.formProject.r3,
                                'r4': this.formProject.r4,
                                'startTime': this.formProject.startTime,
                                'endTime': this.formProject.endTime,
                                'projectDescribe': this.formProject.projectDescribe,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formProject')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //培训经历
                    if (formName == 'formTrain') {
                        if (type == 'add') {
                            //新增培训经历接口
                            trainInfoAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'mechanismName': this.formTrain.mechanismName,
                                'startTime': this.formTrain.startTime,
                                'endTime': this.formTrain.endTime,
                                'curriculum': this.formTrain.curriculum,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formTrain')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑培训经历接口
                            trainInfoEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'mechanismName': this.formTrain.mechanismName,
                                'startTime': this.formTrain.startTime,
                                'endTime': this.formTrain.endTime,
                                'curriculum': this.formTrain.curriculum,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formTrain')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //语言能力
                    if (formName == 'formLanguage') {
                        if (type == 'add') {
                            //新增语言能力接口
                            languageInfoAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'type': this.formLanguage.type,
                                'oralLanguageLevel': this.formLanguage.oralLanguageLevel,
                                'readingLevel': this.formLanguage.readingLevel,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formLanguage')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑语言能力接口
                            languageInfoEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'type': this.formLanguage.type,
                                'oralLanguageLevel': this.formLanguage.oralLanguageLevel,
                                'readingLevel': this.formLanguage.readingLevel,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formLanguage')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //特长技能
                    if (formName == 'formSkill') {
                        if (type == 'add') {
                            //新增特长技能接口
                            skillInfoAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'name': this.formSkill.name,
                                'time': '-1',
                                'level': '良好',
                                'r1': this.formSkill.r1,
                                'r2': this.formSkill.r2,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formSkill')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑特长技能接口
                            skillInfoEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'name': this.formSkill.name,
                                'time': '-1',
                                'level': '良好',
                                'r1': this.formSkill.r1,
                                'r2': this.formSkill.r2,
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formSkill')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //资质证书
                    if (formName == 'formCertificate') {
                        if (type == 'add') {
                            //新增资质证书接口
                            certificateInfoAdd({
                                'id': '',
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'name': this.formCertificate.name,
                                'time': this.formCertificate.time,
                                'licenseIssuingUnit': this.formCertificate.licenseIssuingUnit
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formCertificate')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        } else {
                            //编辑资质证书接口
                            certificateInfoEdit({
                                'id': this.editIdStorage[formName],
                                'userId': this.userId,
                                'resumeId': this.resumeId,
                                'name': this.formCertificate.name,
                                'time': this.formCertificate.time,
                                'licenseIssuingUnit': this.formCertificate.licenseIssuingUnit
                            }).then(res => {
                                console.log(res);
                                if (res.code == 200) {
                                    this.$message.success('保存成功');
                                    this.cancelEdit('formCertificate')
                                    this.updateResumeInfo()//根据简历id更新在线简历详情
                                } else {
                                    this.$message.error(res.message);
                                }
                            });
                        }
                    }
                    //上传附件
                    if (formName == 'formEnclosure') {
                        console.log(this.formEnclosure)
                        if (!this.formEnclosure.file.name) {
                            this.$message.error('请上传文件');
                            return false
                        }
                        let type = this.formEnclosure.file.name.substring(this.formEnclosure.file.name.lastIndexOf(".") + 1)
                        let date = new Date().getFullYear() + '/' + (new Date().getMonth() + 1)
                        let formData = new FormData();
                        formData.append('file', this.formEnclosure.file, this.formEnclosure.name + '.' + type);//
                        formData.append('biz', 'public/user/' + date);
                        uploadFile(formData).then(res => {
                            if (res.code == 200) {
                                resumeEdit({
                                    'id': this.resumeId,
                                    'userId': this.userId,
                                    'type': 0,
                                    'enclosureId': res.result.fileId,
                                }).then(res => {
                                    console.log(res);
                                    if (res.code == 200) {
                                        this.$message.success('保存成功');
                                        this.cancelEdit('formEnclosure')
                                        this.updateResumeInfo()//根据简历id更新在线简历详情
                                    } else {
                                        this.$message.error(res.message);
                                    }
                                });
                            } else {
                                this.$message.error(res.message);
                            }
                        });
                    }
                } else {
                    console.log('error submit!!');
                    return false;
                }
            });
        },
        //调简历信息
        getResume() {
            this.random = Math.random();
            getResume({
                'resumeId': this.resumeId,
            }).then(res => {
                if (res.code == 200) {
                    // 家庭成员
                    if (res.result.familyMembers) {
                        this.familyList = res.result.familyMembers;
                    }
                    //个人信息
                    if (res.result.userInfo.name) {
                        this.formUserInfo.name = res.result.userInfo.name
                        this.formUserInfo.email = res.result.userInfo.email
                        this.formUserInfo.sex = res.result.userInfo.sex.toString()
                        this.formUserInfo.birthday = res.result.userInfo.birthday
                        this.formUserInfo.homeTownCode = res.result.userInfo.homeTownCode
                        this.formUserInfo.liveCityCode = res.result.userInfo.liveCityCode
                        this.formUserInfo.workState = res.result.userInfo.workState + '';
                        this.formUserInfo.jobTime = res.result.userInfo.jobTime
                        this.formUserInfo.identity = res.result.userInfo.idEntity.toString()
                        this.formUserInfo.maritalStatus = res.result.userInfo.maritalStatus.toString()
                        this.formUserInfo.updateTime = this.$formatDate(res.result.userInfo.updateTime)
                        this.formUserInfo.liveCity_dictText = res.result.userInfo.liveCity_dictText.split(',')[1]
                        this.formUserInfo.age = res.result.userInfo.age
                        this.formUserInfo.workYear = res.result.userInfo.workYears
                        this.formUserInfo.partyTime = res.result.userInfo.partyTime
                        this.formUserInfo.foreignLanguage = res.result.userInfo.foreignLanguage
                        this.formUserInfo.computerSkill = res.result.userInfo.computerSkill
                        this.formUserInfo.address = res.result.userInfo.address

                        // this.formUserInfo.r1 = res.result.userInfo.adjustFlag ? res.result.userInfo.adjustFlag : '1'
                        this.formUserInfo.r2 = res.result.userInfo.nation
                        this.formUserInfo.r3 = res.result.userInfo.height
                        this.formUserInfo.r4 = res.result.userInfo.weight
                        this.formUserInfo.r5 = res.result.userInfo.license
                        this.formUserInfo.r6 = res.result.userInfo.idCard
                        this.formUserInfo.r7 = res.result.userInfo.emergencyContact
                        this.formUserInfo.r8 = res.result.userInfo.emergencyContactNumber
                        if (res.result.userInfo.phone) {
                            this.formUserInfo.phone = res.result.userInfo.phone
                        } else {
                            this.formUserInfo.phone = this.userName
                        }
                        if (res.result.userInfo.political) {
                            this.formUserInfo.political = res.result.userInfo.political.toString()
                        }
                        this.photo = res.result.userInfo.photoId_dictText
                        if (res.result.userInfo.jobTime) {
                            let date1 = this.$formatDate(res.result.userInfo.jobTime)

                        }
                        if (res.result.userInfo.jobFlag == 1) {
                            this.formUserInfo.jobTimeFlag = false
                        } else {
                            this.formUserInfo.jobTimeFlag = true
                        }
                    } else {
                        this.formUserInfo.phone = res.result.userInfo.phone
                        this.formUserInfo.name = '游客_' + res.result.userInfo.phone.replace(/([0-9]{7})([0-9]{4})/, '$2')
                        // this.$router.push({name: 'FirstResume', query: {stepsActive: 0}})
                    }
                    //简历类型
                    this.resumeType = res.result.resumes.resumeType
                    console.log("resumeType  ==>", this.formUserInfo.resumeType);
                    console.log("workState1  ==>", this.formUserInfo.workState);


                    // this.formAdvantage.tripartiteAgreement = res.result.resumes.tripartiteAgreement
                    this.formUserInfo.tripartiteAgreement = res.result.resumes.tripartiteAgreement
                    //个人优势
                    if (res.result.resumes.advantage) {
                        this.formAdvantage.advantage = res.result.resumes.advantage
                    }
                    if (res.result.resumes.majorResearchDirection) {
                        this.formAdvantage.majorResearchDirection = res.result.resumes.majorResearchDirection
                    }
                    if (res.result.resumes.majorWorkPerformance) {
                        this.formAdvantage.majorWorkPerformance = res.result.resumes.majorWorkPerformance
                    }

                    if (res.result.resumes.otherSituations) {
                        this.formAdvantage.otherSituations = res.result.resumes.otherSituations
                    }
                    if (res.result.resumes.selfEvaluation) {
                        this.formAdvantage.selfEvaluation = res.result.resumes.selfEvaluation
                    }
                    //期望职位
                    if (res.result.workIntentions) {
                        let list = res.result.workIntentions
                        for (let i in list) {
                            list[i].cityId_dictText = list[i].cityId_dictText.replace(/\,/g, "/")
                            list[i].workIndustry_dictText = list[i].workIndustry_dictText.split(',')
                            list[i].workNature_dictText = list[i].workNature_dictText.split(',')
                            list[i].money = list[i].minMoney + '-' + list[i].maxMoney
                            if (list[i].money == '0-1000') {
                                list[i].money1 = '1000元/月以下'
                            } else if (list[i].money == '1000-2000') {
                                list[i].money1 = '1000-2000元/月'
                            } else if (list[i].money == '2000-4000') {
                                list[i].money1 = '2000-4000元/月'
                            } else if (list[i].money == '4000-6000') {
                                list[i].money1 = '4000-6000元/月'
                            } else if (list[i].money == '6000-8000') {
                                list[i].money1 = '6000-8000元/月'
                            } else if (list[i].money == '8000-10000') {
                                list[i].money1 = '8000-10000元/月'
                            } else if (list[i].money == '10000-15000') {
                                list[i].money1 = '10000-15000元/月'
                            } else if (list[i].money == '15000-25000') {
                                list[i].money1 = '15000-25000元/月'
                            } else if (list[i].money == '25000-35000') {
                                list[i].money1 = '25000-35000元/月'
                            } else if (list[i].money == '35000-50000') {
                                list[i].money1 = '35000-50000元/月'
                            } else if (list[i].money == '50000-70000') {
                                list[i].money1 = '50000-70000元/月'
                            } else if (list[i].money == '70000-100000') {
                                list[i].money1 = '70000-100000元/月'
                            } else if (list[i].money == '100000-999999') {
                                list[i].money1 = '100000元/月以上'
                            }
                            if (list[i].workType == '0') {
                                list[i].workType_dictText = '全职'
                            } else if (list[i].workType == '1') {
                                list[i].workType_dictText = '兼职'
                            } else if (list[i].workType == '2') {
                                list[i].workType_dictText = '实习'
                            }
                        }
                        this.wantJobList = list
                    }
                    //工作经历
                    if (res.result.userWorkInfos) {
                        let list = res.result.userWorkInfos
                        for (let i in list) {
                            // list[i].r1 = list[i].r1 ? list[i].r1.split(',') : []
                            list[i].positionName_dictText = list[i].positionName_dictText.split(',')
                            list[i].workStartTime_dictText = this.$formatDateMonth(list[i].workStartTime)
                            list[i].workEndTime_dictText = this.$formatDateMonth(list[i].workEndTime)
                            //list[i].workTime = [list[i].workStartTime, list[i].workEndTime]
                        }
                        this.workList = list
                    }
                    //教育经历
                    if (res.result.userEduInfos) {
                        let list = res.result.userEduInfos
                        for (let i in list) {
                            list[i].startEduTime_dictText = this.$formatDateMonth(list[i].startEduTime)
                            list[i].endEduTime_dictText = this.$formatDateMonth(list[i].endEduTime)
                            //list[i].studyTime = [list[i].startEduTime, list[i].endEduTime]
                            list[i].recruitmentFlag = list[i].recruitmentFlag + ''
                            list[i].eduLevel = list[i].eduLevel.toString()
                        }
                        this.educationList = list
                    }
                    //项目经历
                    if (res.result.projectInfos) {
                        let list = res.result.projectInfos
                        for (let i in list) {
                            list[i].startTime_dictText = this.$formatDateMonth(list[i].startTime)
                            list[i].endTime_dictText = this.$formatDateMonth(list[i].endTime)
                            list[i].time = [list[i].startTime, list[i].endTime]
                        }
                        this.projectList = list
                    }
                    //培训经历
                    if (res.result.trainInfos) {
                        let list = res.result.trainInfos
                        for (let i in list) {
                            list[i].startTime_dictText = this.$formatDateMonth(list[i].startTime)
                            list[i].endTime_dictText = this.$formatDateMonth(list[i].endTime)
                            list[i].time = [list[i].startTime, list[i].endTime]
                        }
                        this.trainList = list
                    }
                    //语言能力
                    if (res.result.languageLevelInfos) {
                        let list = res.result.languageLevelInfos
                        this.languageList = list
                    }
                    //特长技能
                    if (res.result.skillsInfos) {
                        let list = res.result.skillsInfos
                        this.skillList = list
                    }
                    //资质证书
                    if (res.result.certificateInfos) {
                        let list = res.result.certificateInfos
                        for (let i in list) {
                            list[i].time_dictText = this.$formatDateMonth(list[i].time)
                        }
                        this.certificateList = list
                    }
                    //附件
                    if (res.result.files) {
                        let list = res.result.files
                        this.fileList = list
                    }
                }
            });//end of getResume

            resumeCheck({
                'id': this.resumeId,
            }).then(res => {
                if (res.code == 200) {

                }
                if (res.message) {
                    // this.checkResult="需要完善更多的信息："+res.message;
                }

            });//end of getResume

        },
        //预览附件简历
        LookEnclosure(e) {
            this.$refs.Header.LookEnclosureFlag = e.LookEnclosureFlag
        },
        //更新用户信息
        updataUserInfo() {
            //获取用户信息
            personInfo({
                'id': this.userId
            }).then(res => {
                console.log(res);
                if (res.code == 200) {
                    localStorage.setItem('userInfo', JSON.stringify(res.result))
                }
            });
        },
        //根据简历id更新在线简历详情
        updateResumeInfo() {
            updateResumeInfo({
                'resumeId': this.resumeId,
            }).then(res => {
                console.log(res);
            });
        },
        //查看附件
        openFile(file, fileId, fileLastName) {
            let sign = ''
            //获取签名
            getSign({
                'fileId': fileId,
            }).then(res => {
                if (res.code == 200) {
                    sign = res.result
                    if (fileLastName == 'png' || fileLastName == 'jpg') {
                        this.handlePictureCardPreview(file + '?sign=' + sign)
                    }
                    if (fileLastName == 'pdf') {
                        this.handlePictureCardPreview()
                        this.dialogPdfUrl = pdf.createLoadingTask(file + '?sign=' + sign)
                        this.dialogPdfUrl.promise.then(pdf => {
                            this.numPages = pdf.numPages
                        }).catch(err => {
                            this.$message.error('简历预览失败')
                            console.log(err)
                        })
                    }
                }
            });
        },
        //查看附件图片
        handlePictureCardPreview(url) {
            this.dialogImageUrl = url
            this.dialogVisible = true;
        },
        //清空弹出内容
        dialogClose() {
            this.dialogVisible = false;
            setTimeout(() => {
                this.dialogImageUrl = ''
                this.dialogPdfUrl = ''
            }, 500)
        },
      //学校查询
      findSchoolDict(val) {
        if(val !== '') {
          schoolDictQuery({
            'dictId': '1324603818627518466',
            'itemText': val
          }).then(res => {
            if (res.code == 200) {
              this.schoolList = res.result.records;
            }
          });
        }
      },
      //专业查询
      findMajorDict(val) {
        if (val !== '') {
          majorDictQuery({
            'dictId': '1324643348097257474',
            'itemText': val
          }).then(res => {
            if (res.code == 200) {
              this.majorList = res.result.records;
            }
          });
        }
      }
    },
    //生命周期 - 创建完成（可以访问当前this实例）
    created() {
        //this.$router.push({name:'FirstResume',query:{stepsActive:0}})
    },
    //生命周期 - 挂载完成（可以访问DOM元素）
    mounted() {
        //判断登录状态
        this.userLoginFlag()
        this.userName = JSON.parse(localStorage.getItem('userInfo')).username
        this.userId = JSON.parse(localStorage.getItem('userInfo')).userId
        this.id = JSON.parse(localStorage.getItem('userInfo')).id
        this.formUserInfo.photoId = JSON.parse(localStorage.getItem('userInfo')).photoId
        this.resumeId = localStorage.getItem('resumeId')
        //省市区查询
        baseData({
            'clz': 'area'
        }).then(res => {
            if (res.code == 200) {
                this.areaList = res.result
            }
        });
        //职位查询
        baseData({
            'clz': 'position'
        }).then(res => {
            if (res.code == 200) {
                this.jobPosition = res.result
            }
        });
        //行业查询
        baseData({
            'clz': 'industry'
        }).then(res => {
            if (res.code == 200) {
                this.industryList = res.result
            }
        });
        //调简历信息
        this.getResume();
    }
};
</script>
<style lang="scss">
@mixin text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@mixin text-ellipsisclamp($clamp) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $clamp;
    overflow: hidden;
}

@mixin transition {
    transition: all .3s;
}

.bt {
    padding: 0 10px;
    height: 24px;
    line-height: 24px;
    font-size: 14px;
    color: #fff;
    font-weight: normal;
    border-radius: 10px 0px 10px 0px;
    background: #E54437;
    display: inline-block;
    text-align: center;
    vertical-align: 2px;
    margin-left: 5px
}

.PersonResume {
    background: #f6f6f6;

    .main {
        min-height: 500px;

        .banner {
            width: 100%;
            height: 120px;
            background: url("../../assets/person-bg.jpg") center no-repeat;
            background-size: cover;
        }

        .block {
            height: auto;
            overflow: hidden;
            margin-top: 30px;
            padding-bottom: 60px;

            .left {
                width: 900px;
                height: auto;
                overflow: hidden;

                .top {
                    height: auto;
                    overflow: hidden;
                    background: #eee;
                    padding: 15px 30px;

                    label {
                        font-size: 16px;
                        color: #666;
                        font-weight: bold;
                        line-height: 40px;
                        display: inline-block;
                        vertical-align: -1px
                    }

                    .el-select {
                        width: 110px;

                        .el-input__inner {
                            font-size: 16px;
                            border: 0 !important;
                            background: none !important;
                            color: #E54437;
                            font-weight: bold
                        }
                    }
                }

                .resume {
                    height: auto;
                    overflow: hidden;
                    padding: 30px;
                    background: #fff;

                    .section {
                        height: auto;
                        overflow: hidden;
                        margin-bottom: 20px;
                        padding-bottom: 20px;
                        border-bottom: 1px solid #f2f2f2;

                        .title {
                            font-size: 16px;
                            color: #333;
                            font-weight: bold;
                            position: relative;
                            padding-left: 15px;
                            margin-bottom: 10px;

                            &:after {
                                content: "";
                                width: 3px;
                                height: 15px;
                                background: #E54437;
                                position: absolute;
                                left: 0;
                                top: 3px;
                            }

                            .btnEdit {
                                opacity: 1;
                            }
                        }

                        .btnEdit {
                            opacity: 0;
                            float: right;
                            font-size: 16px;
                            /*font-weight: normal;*/
                            font-weight: bold;
                            color: #999;
                            @include transition();
                            cursor: pointer;

                            margin: 0 10px 0 20px;

                            i {
                                margin-right: 4px
                            }

                            &:hover {
                                color: #E54437;
                            }
                        }

                        .form {
                            height: auto;
                            padding: 30px;

                            .el-radio {
                                min-width: 100px;
                                text-align: center;
                                margin: 0 15px 0 0;
                                border-radius: 0;
                                background: #fff;

                                &:last-child {
                                    margin: 0;
                                }
                            }

                            .el-row {
                                margin-bottom: 22px;
                            }

                            .el-input, .el-select, .el-cascader {
                                width: 100%;
                            }

                            .el-input__inner {
                                border-radius: 0;
                            }

                            .el-icon-date, .el-input__icon {
                                vertical-align: -2px;
                            }

                            .el-textarea__inner {
                                height: 100px;
                                border-radius: 0;
                                padding: 10px 15px
                            }

                            .el-textarea .el-input__count {
                                line-height: normal;
                            }

                            .el-form-item:last-child {
                                margin: 0;
                            }

                            .left, .right {
                                width: 48%;
                                height: auto;
                                overflow: visible;
                            }

                            .el-upload {
                                width: 140px;
                                height: 140px;
                                line-height: 140px;
                                border: 1px dashed #DCDFE6;
                                border-radius: 5px;
                                cursor: pointer;

                                i {
                                    font-size: 22px;
                                    color: #999;
                                }
                            }

                            .hide {
                                .el-upload, .el-upload__tip {
                                    display: none;
                                }
                            }
                        }

                        .primary {
                            height: auto;
                            overflow: hidden;
                            position: relative;

                            ul {
                                height: auto;
                                overflow: hidden;

                                li {
                                    height: auto;
                                    overflow: hidden;
                                    margin-bottom: 10px;

                                    .t {
                                        font-size: 16px;
                                        color: #333;

                                        span {
                                            font-size: 14px;
                                            color: #999;
                                            margin-left: 10px;
                                        }

                                        .btnEdit {
                                            margin-right: 0;
                                        }
                                    }

                                    .dsc {
                                        font-size: 14px;
                                        color: #888;
                                        line-height: 30px;
                                        margin-top: 8px;

                                        span {
                                            margin-right: 15px;
                                            position: relative;
                                            padding-right: 15px;

                                            &:after {
                                                content: "";
                                                width: 1px;
                                                height: 12px;
                                                background: #eee;
                                                position: absolute;
                                                right: 0;
                                                top: 2px;
                                            }

                                            &:last-child {
                                                margin: 0;
                                                padding: 0;

                                                &:after {
                                                    display: none;
                                                }
                                            }
                                        }

                                        .tt {
                                            color: #666;
                                        }

                                        p {
                                            line-height: 22px;
                                            white-space: pre-wrap;
                                        }
                                    }

                                    dl {
                                        height: auto;
                                        overflow: hidden;
                                        margin-top: 8px;

                                        dd {
                                            width: 50%;
                                            font-size: 14px;
                                            color: #666;
                                            float: left;
                                            line-height: 30px;

                                            span {
                                                line-height: 24px;
                                                padding: 0 10px;
                                                background: #eee;
                                                display: inline-block;
                                                margin-right: 10px;
                                            }
                                        }
                                    }

                                    &:last-child {
                                        margin: 0;
                                    }
                                }
                            }

                            .txt {
                                white-space: pre-wrap;
                                word-wrap: break-word;
                                font-size: 14px;
                                color: #666;
                                cursor: pointer;
                                padding: 10px;
                                @include transition();

                                &:hover {
                                    background: #f9f9f9;

                                    .btnEdit {
                                        opacity: 1;
                                    }
                                }
                            }
                        }

                        .edit {
                            height: auto;
                            overflow: hidden;
                            position: relative;
                            background: #f6f6f6;
                            margin-top: 20px;
                        }

                        &:last-child {
                            margin: 0;
                            padding: 0;
                            border: 0;
                        }
                    }

                    .userinfo {
                        .photo {
                            width: 80px;
                            height: 80px;
                            border-radius: 50%;
                            overflow: hidden;
                            float: left;
                            margin-right: 20px;
                            cursor: pointer;
                            position: relative;

                            img {
                                width: 100%;
                                height: 100%;
                            }

                            .avatar-uploader {
                                width: 100%;
                                height: 100%;
                                background: rgba($color: #000000, $alpha: .5);
                                position: absolute;
                                left: 0;
                                top: 0;
                                opacity: 0;
                                @include transition();

                                i {
                                    font-size: 18px;
                                    color: #fff
                                }

                                p {
                                    font-size: 12px;
                                    color: #fff
                                }

                                &:focus {
                                    color: #fff;
                                }

                                .el-upload {
                                    width: 100%;
                                    height: 100%;
                                    display: flex;
                                    flex-flow: column;
                                    align-items: center;
                                    justify-content: center;
                                }
                            }

                            &:hover .avatar-uploader {
                                opacity: 1;
                            }
                        }

                        .btnEdit {
                            opacity: 1;
                        }

                        .text {
                            height: auto;
                            overflow: hidden;

                            .name {
                                font-size: 24px;
                                color: #333;
                                font-weight: bold;

                                span {
                                    font-size: 14px;
                                    color: #999;
                                    font-weight: normal;
                                    margin-left: 10px
                                }
                            }

                            .other {
                                height: auto;
                                overflow: hidden;
                                margin-top: 10px;

                                span {
                                    font-size: 14px;
                                    color: #666666;
                                    position: relative;
                                    padding-right: 15px;
                                    margin-left: 15px;

                                    &:after {
                                        content: "";
                                        width: 1px;
                                        height: 12px;
                                        background: #e8e8e8;
                                        position: absolute;
                                        right: 0;
                                        top: 3px;
                                    }

                                    &:first-child {
                                        margin: 0;
                                    }

                                    &:last-child:after {
                                        display: none;
                                    }
                                }
                            }

                            .contact {
                                height: auto;
                                overflow: hidden;
                                margin-top: 10px;

                                span {
                                    font-size: 14px;
                                    color: #333;
                                    margin-right: 30px;

                                    i {
                                        font-size: 16px;
                                        vertical-align: -1px;
                                        color: #999;

                                        &.icon-email {
                                            font-size: 17px;
                                            margin-right: 3px;
                                        }
                                    }
                                }
                            }
                        }

                        .btnEdit {
                            position: absolute;
                            right: 0;
                            top: 0;
                        }

                        .look {
                            font-size: 16px;
                            font-weight: bold;
                            color: #999;
                            cursor: pointer;
                            position: absolute;
                            right: 0;
                            top: 50px;
                            margin: 0 10px 0 20px;
                            @include transition();

                            i {
                                margin-right: 4px;
                            }

                            &:hover {
                                color: #E54437;
                            }
                        }
                    }

                    .wantJob, .work, .education {
                        .el-input {
                            width: 100% !important;
                        }

                        .el-radio {
                            min-width: 100px !important;
                        }
                    }

                    .project {
                        .el-textarea__inner {
                            height: 150px !important;
                        }
                    }
                }
            }

            .right {
                width: 270px;
                height: auto;
                overflow: hidden;
            }
        }
    }

    .uploadPop {
        .vue-cropper {
            height: 300px;

            img {
                transition: none
            }
        }

        .btns {
            text-align: center;
            margin-top: 25px;

            .el-button {
                width: 100px;
                margin: 0 10px;
            }
        }
    }

    .lookFile {
        .box {
            height: auto;
            max-height: 500px;
            overflow-y: auto;

            img {
                display: block;
                margin: 0 auto;
            }
        }
    }
}
</style>
